adding some operators, working on example
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
[nzsl_version("1.1")]
|
||||
module;
|
||||
|
||||
struct FragIn
|
||||
{
|
||||
[location(0)] pos: vec2[f32]
|
||||
}
|
||||
|
||||
struct FragOut
|
||||
{
|
||||
[location(0)] color: vec4[i32]
|
||||
[location(0)] color: vec4[f32]
|
||||
}
|
||||
|
||||
[entry(frag)]
|
||||
fn main() -> FragOut
|
||||
fn main(input: FragIn) -> FragOut
|
||||
{
|
||||
let base: i32 = 4;
|
||||
let value: i32 = base >> 3;
|
||||
let output: FragOut;
|
||||
output.color = vec4[i32](value, value, value, value);
|
||||
output.color = vec4[f32](1.0, 0.0, 0.0, 1.0);
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user