summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/neoWorldVC_PS.hlsl
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-08-19 16:10:22 +0200
committeraap <aap@papnet.eu>2020-08-19 16:10:22 +0200
commit827ba62671c6e2efe96259a0f130a4d167d14c2a (patch)
tree53bbc586e9a44d19d0cd1a67a69e9c49d9625662 /src/extras/shaders/neoWorldVC_PS.hlsl
parentchanging silly streaming memory limit (diff)
downloadre3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.gz
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.bz2
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.lz
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.xz
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.zst
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.zip
Diffstat (limited to 'src/extras/shaders/neoWorldVC_PS.hlsl')
-rw-r--r--src/extras/shaders/neoWorldVC_PS.hlsl25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/extras/shaders/neoWorldVC_PS.hlsl b/src/extras/shaders/neoWorldVC_PS.hlsl
new file mode 100644
index 00000000..fc4f1de9
--- /dev/null
+++ b/src/extras/shaders/neoWorldVC_PS.hlsl
@@ -0,0 +1,25 @@
+sampler2D Diffuse : register(s0);
+sampler2D Light : register(s1);
+float4 fogColor : register(c0);
+float4 lm : register(c1);
+
+struct PS_INPUT
+{
+ float4 Color : COLOR0;
+ float3 Tex0 : TEXCOORD0;
+ float2 Tex1 : TEXCOORD1;
+};
+
+float4
+main(PS_INPUT IN) : COLOR
+{
+ float4 t0 = tex2D(Diffuse, IN.Tex0.xy);
+ float4 t1 = tex2D(Light, IN.Tex1);
+
+ float4 col = t0*IN.Color*(1 + lm*(t1-1));
+ col.a = IN.Color.a*t0.a*lm.a;
+
+ col.rgb = lerp(fogColor.rgb, col.rgb, IN.Tex0.z);
+
+ return col;
+}