summaryrefslogtreecommitdiff
path: root/copyinverted_opaquestip_planemask_unclipped.hlps
diff options
context:
space:
mode:
Diffstat (limited to 'copyinverted_opaquestip_planemask_unclipped.hlps')
-rw-r--r--copyinverted_opaquestip_planemask_unclipped.hlps50
1 files changed, 50 insertions, 0 deletions
diff --git a/copyinverted_opaquestip_planemask_unclipped.hlps b/copyinverted_opaquestip_planemask_unclipped.hlps
new file mode 100644
index 0000000..985e061
--- /dev/null
+++ b/copyinverted_opaquestip_planemask_unclipped.hlps
@@ -0,0 +1,50 @@
+/* Automatically generated file; do not edit */
+
+/* copyinverted shader for opaquestip with planemask and unclipped */
+
+SamplerState point_sample;
+
+Texture2D stipple : register(t0);
+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
+{
+ uint4 color;
+
+ // Load input color
+ float4 pt = stipple.Sample(point_sample, input.tile_pos);
+ color = foreground;
+ if (pt.r < 0.5)
+ color = background;
+
+ // Load output color
+ int3 pos;
+ pos.xy = input.out_pos.xy;
+ pos.z = 0;
+ uint4 out_color = output.Load(pos);
+
+ // rop
+ color = ~color;
+
+ // planemask
+ color = (color & planemask) | (out_color & ~planemask);
+
+ return color;
+}