Przeglądaj źródła

Merge pull request #15185 from WestLangley/dev-background_frag

Background Shader: Support decoding, tone mapping, and output encoding
Mr.doob 7 lat temu
rodzic
commit
e134bfc062

+ 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>
 
 }

粤ICP备19079148号