https://github.com/shader-slang/slang
Raw File
Tip revision: 172f3f0cc47b1f2f57c9c70a17209599d3a16bca authored by Tim Foley on 02 February 2018, 22:43:37 UTC
Fix bug when subscripting a type that must be split (#396)
Tip revision: 172f3f0
glsl-parameter-blocks.slang
#version 450 core
//TEST:CROSS_COMPILE: -profile ps_5_0 -entry main -target spirv-assembly

struct Test
{
    float4 a;
	Texture2D t;
	SamplerState s;
};

ParameterBlock<Test> gTest;

float4 main(float2 uv : UV)
{
	return gTest.a + gTest.t.Sample(gTest.s, uv);
}
back to top