summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/scale_PS.hlsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/extras/shaders/scale_PS.hlsl')
-rw-r--r--src/extras/shaders/scale_PS.hlsl19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/extras/shaders/scale_PS.hlsl b/src/extras/shaders/scale_PS.hlsl
new file mode 100644
index 00000000..54da9c82
--- /dev/null
+++ b/src/extras/shaders/scale_PS.hlsl
@@ -0,0 +1,19 @@
+struct VS_out {
+ float4 Position : POSITION;
+ float3 TexCoord0 : TEXCOORD0;
+ float4 Color : COLOR0;
+};
+
+sampler2D tex0 : register(s0);
+
+float4 fogColor : register(c0);
+float4 colorscale : register(c1);
+
+float4 main(VS_out input) : COLOR
+{
+ float4 color = input.Color;
+ color *= tex2D(tex0, input.TexCoord0.xy)*colorscale;
+ color.rgb = clamp(color.rgb, 0.0, 1.0);
+ color.rgb = lerp(fogColor.rgb, color.rgb, input.TexCoord0.z);
+ return color;
+}