Page History
...
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
Examples
In these examples, a User Data Int is used to drive the index of a shader switcher.
The most classic data is of type constant, applying to the entire object, and can be set to 1 by
declare my_attr constant INT my_attr 1
Also, you can define the data as uniform, meaning one different value for each polygon (12 triangles here) by
declare my_attr uniform INT my_attr 12 1 INT 1 1 0 0 2 2 2 2 0 0 1 1