mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-14 13:51:04 +00:00
c44b95fdec
In HLSL, there are three (TODO: ??) dimensions of clip and cull distance values: * The semantic's value N, ala SV_ClipDistanceN. * The array demension, if the value is an array. * The vector element, if the value is a vector or array of vectors. In SPIR-V, clip and cull distance are arrays of scalar floats, always. This PR currently ignores the semantic N axis, and handles the other two axes by sequentially copying each vector element of each array member into sequential floats in the output array. Fixes: #946
14 lines
296 B
GLSL
14 lines
296 B
GLSL
void main(out float4 pos : SV_Position,
|
|
out float clip[2] : SV_ClipDistance, // array of scalar float
|
|
out float cull[2] : SV_CullDistance) // array of scalar float
|
|
{
|
|
pos = 1.0f.xxxx;
|
|
clip[0] = 0.5f;
|
|
clip[1] = 0.6f;
|
|
|
|
cull[0] = 0.525f;
|
|
cull[1] = 0.625f;
|
|
}
|
|
|
|
|