Skip to content

Commit

Permalink
WebGLMaterials: Only update transmission uniforms when material.trans…
Browse files Browse the repository at this point in the history
…mission > 0. (#22427)
  • Loading branch information
mrdoob authored Aug 25, 2021
1 parent 292f866 commit 8582be0
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/renderers/webgl/WebGLMaterials.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,32 +632,31 @@ function WebGLMaterials( properties ) {

}

uniforms.transmission.value = material.transmission;
if ( material.transmission > 0 ) {

if ( material.transmissionMap ) {
uniforms.transmission.value = material.transmission;
uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;
uniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height );

uniforms.transmissionMap.value = material.transmissionMap;
if ( material.transmissionMap ) {

}
uniforms.transmissionMap.value = material.transmissionMap;

if ( material.transmission > 0.0 ) {
}

uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;
uniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height );
uniforms.thickness.value = material.thickness;

}
if ( material.thicknessMap ) {

uniforms.thickness.value = material.thickness;
uniforms.thicknessMap.value = material.thicknessMap;

if ( material.thicknessMap ) {
}

uniforms.thicknessMap.value = material.thicknessMap;
uniforms.attenuationDistance.value = material.attenuationDistance;
uniforms.attenuationTint.value.copy( material.attenuationTint );

}

uniforms.attenuationDistance.value = material.attenuationDistance;
uniforms.attenuationTint.value.copy( material.attenuationTint );

uniforms.specularIntensity.value = material.specularIntensity;
uniforms.specularTint.value.copy( material.specularTint );

Expand Down

0 comments on commit 8582be0

Please sign in to comment.