summaryrefslogtreecommitdiffstats
path: root/src/runtimerender/rendererimpl/Qt3DSRendererImplShaders.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtimerender/rendererimpl/Qt3DSRendererImplShaders.cpp')
-rw-r--r--src/runtimerender/rendererimpl/Qt3DSRendererImplShaders.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtimerender/rendererimpl/Qt3DSRendererImplShaders.cpp b/src/runtimerender/rendererimpl/Qt3DSRendererImplShaders.cpp
index c33aaeb..d69e46e 100644
--- a/src/runtimerender/rendererimpl/Qt3DSRendererImplShaders.cpp
+++ b/src/runtimerender/rendererimpl/Qt3DSRendererImplShaders.cpp
@@ -2430,10 +2430,11 @@ namespace render {
vertexGenerator.Append("}");
fragmentGenerator.AddUniform("layer_image", "sampler2D");
+ fragmentGenerator.AddUniform("anaglyphColor", "vec4");
fragmentGenerator.Append("void main() {");
fragmentGenerator.Append("\tvec2 theCoords = uv_coords;\n");
fragmentGenerator.Append("\tvec4 theLayerTexture = texture2D( layer_image, theCoords );\n");
- fragmentGenerator.Append("\tfragOutput = theLayerTexture;\n");
+ fragmentGenerator.Append("\tfragOutput = theLayerTexture * anaglyphColor;\n");
fragmentGenerator.Append("}");
NVRenderShaderProgram *theShader = GetProgramGenerator().CompileGeneratedShader(
"layer shader", SShaderCacheProgramFlags(), TShaderFeatureSet());