summaryrefslogtreecommitdiff
path: root/set_solid_fullmask_clipmask.hlps
diff options
context:
space:
mode:
authorPeter Harris <pharris@opentext.com>2014-03-10 13:03:51 -0400
committerPeter Harris <pharris@opentext.com>2014-03-10 13:03:51 -0400
commita8d6bbf19a3e6c57c8b902cbd994bafe63591078 (patch)
tree6547c2fa2e10ca840e6df30348e4a8077cfc336f /set_solid_fullmask_clipmask.hlps
parentc404049a52f7999d716bc0e2cf6c7af30c62f50f (diff)
Add generated shadersHEADmaster
So they can be studied without needing to run the generator.
Diffstat (limited to 'set_solid_fullmask_clipmask.hlps')
-rw-r--r--set_solid_fullmask_clipmask.hlps51
1 files changed, 51 insertions, 0 deletions
diff --git a/set_solid_fullmask_clipmask.hlps b/set_solid_fullmask_clipmask.hlps
new file mode 100644
index 0000000..fda76c0
--- /dev/null
+++ b/set_solid_fullmask_clipmask.hlps
@@ -0,0 +1,51 @@
+/* Automatically generated file; do not edit */
+
+/* set shader for solid with fullmask and clipmask */
+
+SamplerState point_sample;
+
+Texture2D clipmask : register(t1);
+Texture2D<uint4> output : register(t2);
+
+cbuffer colors :register(b0) {
+ uint4 foreground;
+ uint4 background;
+ uint4 planemask;
+}
+
+cbuffer tile_stats :register(b1) {
+ uint4 plane;
+ uint2 tile_wh;
+}
+
+struct PS_INPUT {
+ float2 tile_pos : TEXCOORD0;
+ float2 clip_pos : TEXCOORD1;
+ float2 out_pos : TEXCOORD2;
+};
+
+uint4 main(PS_INPUT input) : SV_TARGET
+{
+ // Test clip mask
+ float4 cm = clipmask.Sample(point_sample, input.clip_pos);
+ if (cm.r < 0.5) {
+ discard;
+ return 0;
+ }
+
+ uint4 color;
+
+ // Load input color
+ color = foreground;
+
+ // Load output color
+ int3 pos;
+ pos.xy = input.out_pos.xy;
+ pos.z = 0;
+ uint4 out_color = output.Load(pos);
+
+ // rop
+ color = 255;
+
+ return color;
+}