瀏覽代碼

ShaderChunk: Fixed overblown color in transmission_fragment (#22125)

Mr.doob 4 年之前
父節點
當前提交
5804c24d3a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js

+ 1 - 1
src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js

@@ -21,7 +21,7 @@ export default /* glsl */`
 	float ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );
 
 	vec3 transmission = transmissionFactor * getIBLVolumeRefraction(
-		normal, v, roughnessFactor, material.diffuseColor, totalSpecular,
+		normal, v, roughnessFactor, material.diffuseColor, material.specularColor,
 		pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,
 		attenuationColor, attenuationDistance );