Browse Source

Support decoding, tonemapping, and output encoding

WestLangley 6 years ago
parent
commit
378db2e1b6
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/renderers/shaders/ShaderLib/background_frag.glsl

+ 6 - 1
src/renderers/shaders/ShaderLib/background_frag.glsl

@@ -4,6 +4,11 @@ varying vec2 vUv;
 
 void main() {
 
-	gl_FragColor = texture2D( t2D, vUv );
+	vec4 texColor = texture2D( t2D, vUv );
+
+	gl_FragColor = mapTexelToLinear( texColor );
+
+	#include <tonemapping_fragment>
+	#include <encodings_fragment>
 
 }