I’m trying to understand something very basic… I have a simple shader that just renders a ramp. I can easily make this ramp go along any axis in object space by just using gl_Vertex as an input value. But the ramp doesn’t automatically fit the object size. Is there a value or matrix I can use to normalize the gl_Vertex values from 0 to 1, relative to the bounding region of the object?
I guess my question is: Is the bounding region of an object made available to a vertex shader automatically through a built-in variable? In my case, I am writing a shader and do not have direct access to the geometry, so cannot just precompute the bounding size as a uniform.