yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
31bb5eaa0
master
1// shader.slang 2 3// This shader is part of the `reflection-parameter-blocks` 4// example program. 5// 6// This file is an example program that *only* declares 7// shader parameters in the global scope, and *only* uses 8// explicit parameter blocks. 9 10import common; 11 12ParameterBlock<Environment> environment; 13ParameterBlock<View> view; 14ParameterBlock<Material> material; 15ParameterBlock<Mesh> mesh; 16 17[shader("compute")] 18void main() 19{ 20 float4 r = 0; 21 22 use(r, mesh); 23 use(r, material); 24 use(r, view); 25 use(r, environment); 26}