yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeCapability type checking. (#3530)14764896c

master
418 B14 linesraw
1// get-attribute-at-vertex.slang.hlsl
2
3//TEST_IGNORE_FILE:
4
5[shader("pixel")]
6void main(
7    nointerpolation vector<float,4> color_0 : COLOR,
8    vector<float,3> bary_0 : SV_BARYCENTRICS,
9    out vector<float,4> result_0 : SV_TARGET)
10{
11    result_0 = bary_0.x * GetAttributeAtVertex(color_0, 0U)
12             + bary_0.y * GetAttributeAtVertex(color_0, 1U)
13             + bary_0.z * GetAttributeAtVertex(color_0, 2U);
14}