summaryrefslogtreecommitdiffstats
path: root/Studio/Content/Effect Library/AdditiveColorGradient.effect
diff options
context:
space:
mode:
Diffstat (limited to 'Studio/Content/Effect Library/AdditiveColorGradient.effect')
-rw-r--r--Studio/Content/Effect Library/AdditiveColorGradient.effect32
1 files changed, 32 insertions, 0 deletions
diff --git a/Studio/Content/Effect Library/AdditiveColorGradient.effect b/Studio/Content/Effect Library/AdditiveColorGradient.effect
new file mode 100644
index 0000000..7131963
--- /dev/null
+++ b/Studio/Content/Effect Library/AdditiveColorGradient.effect
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<Effect>
+ <MetaData>
+ <Property formalName="Top Color" name="top_color" type="Color" default="0.65 0.35 0.15" description="Top color of the gradient."/>
+ <Property formalName="Bottom Color" name="bottom_color" type="Color" default="0.05 0.35 0.75" description="Bottom color of the gradient."/>
+ </MetaData>
+ <Shaders>
+ <Shared></Shared>
+ <VertexShaderShared></VertexShaderShared>
+ <FragmentShaderShared></FragmentShaderShared>
+ <Shader name="main">
+ <VertexShader></VertexShader>
+ <FragmentShader><![CDATA[
+
+void frag()
+{
+ vec4 origColor = texture2D_0(TexCoord);
+ vec2 uv = TexCoord.xy;
+
+ vec4 gradient = vec4(mix(vec4(bottom_color.rgb, 1.0), vec4(top_color.rgb, 1.0), uv.y));
+
+ gl_FragColor = origColor + gradient;
+}
+ ]]></FragmentShader>
+ </Shader>
+ </Shaders>
+ <Passes>
+ <Pass shader="main" input="[source]" output="[dest]"/>
+ </Passes>
+</Effect>
+
+