浏览代码

#8445 Adjust Define in GammaCorrectionShader

Mugen87 9 年之前
父节点
当前提交
2225c9e6e8
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      examples/js/shaders/GammaCorrectionShader.js

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

@@ -28,8 +28,6 @@ THREE.GammaCorrectionShader = {
 
 
 	fragmentShader: [
 	fragmentShader: [
 
 
-		"#define GAMMA_FACTOR 2",
-
 		"uniform sampler2D tDiffuse;",
 		"uniform sampler2D tDiffuse;",
 
 
 		"varying vec2 vUv;",
 		"varying vec2 vUv;",
@@ -38,7 +36,7 @@ THREE.GammaCorrectionShader = {
 
 
 			"vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );",
 			"vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );",
 
 
-			"gl_FragColor = LinearToGamma( tex, 2.0 );",
+			"gl_FragColor = LinearToGamma( tex, float( GAMMA_FACTOR ) );",
 
 
 		"}"
 		"}"