Browse Source

fix LinearToLogLuv convert

angus 6 years ago
parent
commit
d682f4c2c0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/renderers/shaders/ShaderChunk/encodings_pars_fragment.glsl.js

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

@@ -61,7 +61,7 @@ vec4 LinearToRGBD( in vec4 value, in float maxRange ) {
 // M matrix, for encoding
 const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );
 vec4 LinearToLogLuv( in vec4 value )  {
-	vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;
+	vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;
 	Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );
 	vec4 vResult;
 	vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;