mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-25 08:14:12 +00:00
docs
This commit is contained in:
parent
d3605f79c7
commit
bc5c45f696
@ -94,5 +94,16 @@ Example:
|
||||
|
||||
```rust
|
||||
#[spirv(fragment)]
|
||||
fn main(#[spirv(flat)] obj: &u32) { }
|
||||
fn main(#[spirv(flat)] obj: u32) { }
|
||||
```
|
||||
|
||||
## Invariant
|
||||
|
||||
The invariant attribute corresponds to the invariant keyword in glsl. It can only be applied to output variables.
|
||||
|
||||
Example:
|
||||
|
||||
```rust
|
||||
#[spirv(vertex)]
|
||||
fn main(#[spirv(invariant)] var: &mut f32) { }
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user