22 lines
351 B
Plaintext
22 lines
351 B
Plaintext
[nzsl_version("1.1")]
|
|
[feature(float64)]
|
|
module;
|
|
|
|
struct FragOut
|
|
{
|
|
[location(0)] color: vec4[f32]
|
|
}
|
|
|
|
fn computeColor(val: f32) -> f32
|
|
{
|
|
return 2.0 * val;
|
|
}
|
|
|
|
[entry(frag)]
|
|
fn main() -> FragOut
|
|
{
|
|
let output: FragOut;
|
|
output.color = vec4[f32](computeColor(1.0), computeColor(2.0), computeColor(3.0), computeColor(4.0));
|
|
return output;
|
|
}
|