Are some limits of shader's size or variable's number in fragment shader?
I've fragment shader, which returns empty image after some threshold size of code. I think, that problem is in limit of shader's size or number of variables.
I check my shader program after compilation - all is ok.
Apple said:
OpenGL ES limits the number of each variable type you can use in a vertex or fragment shader. The OpenGL ES specification doesn’t require implementations to provide a software fallback when these limits are exceeded; instead, the shader simply fails to compile or link.
Khronos said:
2 Length of Shader Executable This is defined by the conformance tests. 3 Usage of Temporary Variables The maximum number of variables is defined by the conformance tests.
But I can't find value of this limits.
UPDATE:
Sometimes application is interrupted on glFlush
or glDrawArrays
with EXC_BAD_ACCESS
, if image is big.
SOLVED
Problem was in too long loop and from whence in long calculation time. Shader is no big, but very complexity.
UPDATE
Same problem: GPUImage Kuwahara filter on iPhone 4S