Closed GoogleCodeExporter closed 9 years ago
Unfortunately the primary problem is that the fragment shader failing to link
because it is using too many uniforms:
"error X4507: maximum ps_3_0 constant register index (224) exceeded - Try reducing number of constants referenced"
The maximum number of pixel shader constants (ie fragment uniforms) available
in D3D9 is 224.
ANGLE exposes GL_MAX_FRAGMENT_UNIFORM_VECTORS = 221 to the application (we need
to use a few internally).
Looking at the shader in question, here are the uniforms:
- uniform samplerCube source;
- uniform vec2 viewport; // 1 vector
- uniform mat4 inv_proj; // 4 vectors
- uniform mat3 inv_view_rot; // 3 vectors
- const int size = 256;
- uniform vec3 rays[size]; // 256 vectors
This adds up to about 264 uniform vectors.
Thus as indicated, too many constants (uniforms) are being used.
Unfortunately within the D3D9 API there is no way we can increase this.
Florian, would it be possible to scale down the number of rays being used to
fit within the available fragment uniform space (as indicated by
GL_MAX_FRAGMENT_UNIFORM_VECTORS)?
Original comment by dan...@transgaming.com
on 23 Feb 2012 at 6:20
The shader isn't well-formed.
Original comment by c...@chromium.org
on 31 Jan 2014 at 8:51
Original issue reported on code.google.com by
xtc4uall@gmail.com
on 23 Feb 2012 at 9:13