Browse Source

Use sRGB transfer function

WestLangley 5 years ago
parent
commit
a72e0ba0ef

+ 1 - 1
examples/js/shaders/GammaCorrectionShader.js

@@ -36,7 +36,7 @@ THREE.GammaCorrectionShader = {
 
 		"	vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );",
 
-		"	gl_FragColor = LinearToGamma( tex, float( GAMMA_FACTOR ) );",
+		"	gl_FragColor = LinearTosRGB( tex );", // optional: LinearToGamma( tex, float( GAMMA_FACTOR ) );
 
 		"}"
 

+ 1 - 1
examples/jsm/shaders/GammaCorrectionShader.js

@@ -38,7 +38,7 @@ var GammaCorrectionShader = {
 
 		"	vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );",
 
-		"	gl_FragColor = LinearToGamma( tex, float( GAMMA_FACTOR ) );",
+		"	gl_FragColor = LinearTosRGB( tex );", // optional: LinearToGamma( tex, float( GAMMA_FACTOR ) );
 
 		"}"