I have a geometry shader (DirectX 10 SDK, June 2008), like the following:
#define MAXTEXCOORDS 8
float4 pos: SV_POSITION;
float2 UV[MAXTEXCOORDS]: TEXCOORD;
int normalMapUVChannel; // From 0 to 7
void GS(triangle VSOutput input, inout TriangleStream<GSOutput> OutputStream)
float DeltaU1 = input.UV[normalMapUVChannel].x - input.UV[normalMapUVChannel].x;
The shader compiler report the following errors:
error X8000: D3D10 Internal Compiler Error: Invalid Bytecode: Overlapping input index range decl encountered. Opcode #28 (count is 1-based).
error X8000: D3D10 Internal Compiler Error: Invalid Bytecode: Can't continue validation - aborting.
The error is generated by the first line. Note if I make the index constant, the error disappear:
float DeltaU1 = input.UV.x - input.UV.x;
but in this way I need to replicate the shader 8 times (that moreover it's already replicated for other reasons), that's quite a problem. :wallbash:
Someone know a workaround to this? Thanks in advance.