mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-14 22:01:04 +00:00
a5d8616478
Hull shaders have an implicitly arrayed output. This is handled by creating an arrayed form of the provided output type, and writing to the element of it indexed by InvocationID. The implicit indirection into that array was causing some troubles when copying to a split structure. handleAssign was able to handle simple symbol lvalues, but not an lvalue composed of an indirection into an array.
18 lines
429 B
GLSL
18 lines
429 B
GLSL
|
|
// Test mixed output structure: user and builtin members. Hull shaders involve extra
|
|
// logic in this case, over and above e.g. pixel or vertex stages, which is related to
|
|
// the implicit array dimension.
|
|
struct HS_Output
|
|
{
|
|
float tessFactor[3] : SV_TessFactor;
|
|
float coord : TEXCOORD0;
|
|
};
|
|
|
|
[domain("tri")]
|
|
[outputcontrolpoints(3)]
|
|
HS_Output main ( )
|
|
{
|
|
HS_Output output = (HS_Output)0;
|
|
return output;
|
|
}
|