Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGLProgram: Fix transmission check in generateExtensions(). #22377

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 20, 2021

Related issue:-

Description

Minor clean 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' : ''
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameters.transmission is a boolean, not a float.

@@ -206,7 +206,7 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities

sheen: !! material.sheen,

transmission: !! material.transmission,
transmission: material.transmission > 0,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this line more explicit.

@Mugen87 Mugen87 merged commit 0d3b66d into mrdoob:dev Aug 20, 2021
@Mugen87 Mugen87 added this to the r132 milestone Aug 20, 2021
@mrdoob
Copy link
Owner

mrdoob commented Aug 20, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants