Skip to content

Commit

Permalink
WebGLProgram: Fix transmission check in generateExtensions().
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Aug 20, 2021
1 parent 3cf2719 commit 400df8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLProgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function generateExtensions( parameters ) {
( parameters.extensionDerivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ) ? '#extension GL_OES_standard_derivatives : enable' : '',
( parameters.extensionFragDepth || parameters.logarithmicDepthBuffer ) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '',
( parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ) ? '#extension GL_EXT_draw_buffers : require' : '',
( parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission > 0.0 ) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''
( parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission ) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''
];

return chunks.filter( filterEmptyLine ).join( '\n' );
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLPrograms.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities

sheen: !! material.sheen,

transmission: !! material.transmission,
transmission: material.transmission > 0,
transmissionMap: !! material.transmissionMap,
thicknessMap: !! material.thicknessMap,

Expand Down

0 comments on commit 400df8b

Please sign in to comment.