Browse Source

Shaders: Update nomenclature (#33727)

WestLangley 1 tuần trước cách đây
mục cha
commit
2a2f9b5d03

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

@@ -197,7 +197,7 @@ IncidentLight directLight;
 	#ifdef USE_LIGHT_PROBES_GRID
 	#ifdef USE_LIGHT_PROBES_GRID
 
 
 		vec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz;
 		vec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz;
-		vec3 probeWorldNormal = inverseTransformDirection( geometryNormal, viewMatrix );
+		vec3 probeWorldNormal = transformNormalByInverseViewMatrix( geometryNormal, viewMatrix );
 		irradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal );
 		irradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal );
 
 
 	#endif
 	#endif

粤ICP备19079148号