yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
b2abe2f0
main
1 2cbuffer ConstantBuffer : register(b0 ) 3{ 4matrix World ; 5matrix View ; 6matrix Projection ; 7}; 8 9struct VS_INPUT 10{ 11float4 Pos :POSITION ; 12float3 Norm :NORMAL ; 13}; 14 15struct PS_INPUT 16{ 17float4 Pos :SV_POSITION ; 18float3 Norm :TEXCOORD0 ; 19}; 20 21PS_INPUT main (VS_INPUT input ) 22{ 23int ConstantBuffer = 42 ;// test ConstantBuffer as an identifier 24 25PS_INPUT output = (PS_INPUT )0 ; 26output .Pos = mul (input .Pos ,World ); 27output .Pos = mul (output .Pos ,View ); 28output .Pos = mul (output .Pos ,Projection ); 29output .Norm = mul (input .Norm ,World );// Work when output.Norm = mul( input.Norm, (float3x3)World ); 30 31return output ; 32}