aboutsummaryrefslogtreecommitdiff
path: root/demo/d3d11/shaders/imguiPS.hlsl
diff options
context:
space:
mode:
authorMiles Macklin <[email protected]>2017-03-10 14:51:31 +1300
committerMiles Macklin <[email protected]>2017-03-10 14:51:31 +1300
commitad3d90fafe5ee79964bdfe1f1e0704c3ffcdfd5f (patch)
tree4cc6f3288363889d7342f7f8407c0251e6904819 /demo/d3d11/shaders/imguiPS.hlsl
downloadflex-ad3d90fafe5ee79964bdfe1f1e0704c3ffcdfd5f.tar.xz
flex-ad3d90fafe5ee79964bdfe1f1e0704c3ffcdfd5f.zip
Initial 1.1.0 binary release
Diffstat (limited to 'demo/d3d11/shaders/imguiPS.hlsl')
-rw-r--r--demo/d3d11/shaders/imguiPS.hlsl22
1 files changed, 22 insertions, 0 deletions
diff --git a/demo/d3d11/shaders/imguiPS.hlsl b/demo/d3d11/shaders/imguiPS.hlsl
new file mode 100644
index 0000000..f51a21b
--- /dev/null
+++ b/demo/d3d11/shaders/imguiPS.hlsl
@@ -0,0 +1,22 @@
+
+struct Input
+{
+ float4 position : SV_POSITION;
+ float2 texCoord : TEXCOORD;
+ float4 color : COLOR;
+};
+
+Texture2D<float> tex : register(t0);
+SamplerState texSampler : register(s0);
+
+float4 imguiPS(Input input) : SV_TARGET
+{
+ float4 color = input.color;
+
+ if (input.texCoord.x >= 0.f)
+ {
+ color.a *= tex.SampleLevel(texSampler, input.texCoord, 0.f);
+ }
+
+ return color;
+} \ No newline at end of file