I assumed that if a shader is computationally expensive then the execution is just slower. But running the following GLSL FS instead just crashes
void main()
{
float x = 0;
float y = 0;
int sum = 0;
for (float x = 0; x < 10; x += 0.00005)
{
for (float y = 0; y < 10; y += 0.00005)
{
sum++;
}
}
fragColor = vec4(1, 1, 1 , 1.0);
}
with unhandled exception in nvoglv32.dll. Are there any hard limits on the number of steps/time that a shader can take before it is shut down? I was thinking about implementing some time intensive computation in shaders where it would take on the order of seconds to compute a frame, is that possible? Thanks.
↧