working on example
This commit is contained in:
@@ -3,18 +3,24 @@ module;
|
||||
|
||||
struct FragIn
|
||||
{
|
||||
[location(0)] pos: vec2[f32]
|
||||
[location(0)] dim: vec2[f32],
|
||||
[location(1)] pos: vec2[f32],
|
||||
}
|
||||
|
||||
struct FragOut
|
||||
{
|
||||
[location(0)] color: vec4[f32]
|
||||
[location(0)] color: vec4[f32]
|
||||
}
|
||||
|
||||
[entry(frag)]
|
||||
fn main(input: FragIn) -> FragOut
|
||||
{
|
||||
let output: FragOut;
|
||||
output.color = vec4[f32](1.0, 0.0, 0.0, 1.0);
|
||||
return output;
|
||||
let output: FragOut;
|
||||
output.color = vec4[f32](
|
||||
input.pos.x / input.dim.x,
|
||||
input.pos.y / input.dim.y,
|
||||
1.0,
|
||||
1.0
|
||||
);
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user