Cleanup
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
|
||||
#[set(everything)]
|
||||
const constants: {
|
||||
empty: float4;
|
||||
};
|
||||
|
||||
#[set(everything)]
|
||||
const sampler_linear: sampler;
|
||||
|
||||
#[set(everything)]
|
||||
const tex0: tex2d;
|
||||
|
||||
#[set(everything)]
|
||||
const tex1: tex2d;
|
||||
|
||||
#[set(everything)]
|
||||
const tex2: tex2d;
|
||||
|
||||
struct vert_in {
|
||||
pos: float2;
|
||||
}
|
||||
|
||||
struct vert_out {
|
||||
pos: float4;
|
||||
tex: float2;
|
||||
}
|
||||
|
||||
fun copy_mrt3_pass_vert(input: vert_in): vert_out {
|
||||
var output: vert_out;
|
||||
output.tex = input.pos.xy * 0.5 + 0.5;
|
||||
output.tex.y = 1.0 - output.tex.y;
|
||||
output.pos = float4(input.pos.xy, 0.0, 1.0);
|
||||
return output;
|
||||
}
|
||||
|
||||
fun copy_mrt3_pass_frag(input: vert_out): float4[3] {
|
||||
var color: float4[3];
|
||||
color[0] = sample_lod(tex0, sampler_linear, input.tex, 0.0);
|
||||
color[1] = sample_lod(tex1, sampler_linear, input.tex, 0.0);
|
||||
color[2] = sample_lod(tex2, sampler_linear, input.tex, 0.0);
|
||||
return color;
|
||||
}
|
||||
|
||||
#[pipe]
|
||||
struct pipe {
|
||||
vertex = copy_mrt3_pass_vert;
|
||||
fragment = copy_mrt3_pass_frag;
|
||||
}
|
||||
Reference in New Issue
Block a user