working on function calls; ci skip
This commit is contained in:
@@ -1,24 +1,21 @@
|
||||
[nzsl_version("1.1")]
|
||||
[feature(float64)]
|
||||
module;
|
||||
|
||||
struct FragOut
|
||||
{
|
||||
[location(0)] color: vec4[f32]
|
||||
}
|
||||
[nzsl_version("1.1")]
|
||||
[feature(float64)]
|
||||
module;
|
||||
|
||||
[entry(frag)]
|
||||
fn main() -> FragOut
|
||||
{
|
||||
let op1: f64 = 0.0;
|
||||
let op2: f64 = 9.0;
|
||||
let color: f32;
|
||||
if (op1 == op2)
|
||||
color = f32(op1);
|
||||
else
|
||||
color = f32(op2);
|
||||
struct FragOut
|
||||
{
|
||||
[location(0)] color: vec4[f32]
|
||||
}
|
||||
|
||||
let output: FragOut;
|
||||
output.color = vec4[f32](color, color, color, color);
|
||||
return output;
|
||||
}
|
||||
fn computeColor() -> f32
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
[entry(frag)]
|
||||
fn main() -> FragOut
|
||||
{
|
||||
let output: FragOut;
|
||||
output.color = vec4[f32](computeColor(), computeColor(), computeColor(), computeColor());
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user