aboutsummaryrefslogtreecommitdiff
path: root/demo/d3d/shaders/imguiPS.hlsl
diff options
context:
space:
mode:
authorMiles Macklin <[email protected]>2017-06-09 13:41:15 +1200
committerMiles Macklin <[email protected]>2017-06-09 13:41:15 +1200
commit688b5f42e9bfe498d7af7075d4d8f4429867f3a3 (patch)
tree7e0d0e7c95298f0418723abd92f61ac6e16b055e /demo/d3d/shaders/imguiPS.hlsl
parentUpdate README.md (diff)
downloadflex-688b5f42e9bfe498d7af7075d4d8f4429867f3a3.tar.xz
flex-688b5f42e9bfe498d7af7075d4d8f4429867f3a3.zip
1.2.0.beta.11.2.0.beta.1
Diffstat (limited to 'demo/d3d/shaders/imguiPS.hlsl')
-rw-r--r--demo/d3d/shaders/imguiPS.hlsl22
1 files changed, 22 insertions, 0 deletions
diff --git a/demo/d3d/shaders/imguiPS.hlsl b/demo/d3d/shaders/imguiPS.hlsl
new file mode 100644
index 0000000..f51a21b
--- /dev/null
+++ b/demo/d3d/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