Reputation:
From inside the shader I can't modify uniforms or attributes. Is there a way I could write a variable that I can use outside the shader?
My goal is to determine the lowest and the highest vertex on the z-axis. I could of course run through all the vertices in a for loop, but the shader runs through them anyway and is faster.
Upvotes: 1
Views: 151
Reputation: 3305
Not really. The shader's output, always, is pixels. Anything other than that would violate the stream-processing nature of the GPU. You could read the result pixel values...
Upvotes: 2