yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
c97166aed
master
1implementing fcpw; 2__include math_constants; 3 4public struct Interaction 5{ 6 public float3 p; // interaction point associated with query 7 public float3 n; // normal at interaction point 8 public float2 uv; // uv coordinates of interaction point 9 public float d; // distance to interaction point 10 public uint index; // index of primitive/silhouette associated with interaction point 11 12 // constructor 13 public __init() 14 { 15 p = float3(0.0, 0.0, 0.0); 16 n = float3(0.0, 0.0, 0.0); 17 uv = float2(0.0, 0.0); 18 d = FLT_MAX; 19 index = UINT_MAX; 20 } 21};