Skip to content

Commit 75d795f

Browse files
authored
Fix incorrect string comparison in GLSL lighting (#2296)
Fixes an issue where the actual `filename` (name of the image on disk) was compared against the variable name for radiance and irradiance.
1 parent 94bea4b commit 75d795f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/MaterialXRenderGlsl/GlslProgram.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ void GlslProgram::bindTextures(ImageHandlerPtr imageHandler)
549549
// Lighting textures are handled in the bindLighting() call.
550550
// If no texture can be loaded then the default color defined in
551551
// "samplingProperties" will be used to create a fallback texture.
552-
if (fileName != HW::ENV_RADIANCE &&
553-
fileName != HW::ENV_IRRADIANCE)
552+
if (uniform.first != HW::ENV_RADIANCE &&
553+
uniform.first != HW::ENV_IRRADIANCE)
554554
{
555555
ImageSamplingProperties samplingProperties;
556556
samplingProperties.setProperties(uniform.first, publicUniforms);

0 commit comments

Comments
 (0)