summaryrefslogtreecommitdiff
path: root/pixel.template
blob: c985114691074a3504d7ec38767a1ab678ebf56f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* Automatically generated file; do not edit */

/* {{.Rop}} shader for {{.Style}} with {{.PlaneMask}} and {{.ClipMask}} */

SamplerState point_sample;
{{.Tex}}
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
{
{{.ClipMaskBlock}}    uint4 color;

    // Load input color
{{.Load}}

    // Load output color
    int3 pos;
    pos.xy = input.out_pos.xy;
    pos.z = 0;
    uint4 out_color = output.Load(pos);

    // rop
    {{.RopBlock}};
{{.PlaneMaskBlock}}
    return color;
}