PDA

View Full Version : viewport dimensions in vertex shader



thinks
08-25-2009, 01:45 PM
Simple question: Is there a built-in variable in GLSL that allows access to the viewport dimensions?

There is of course a simple work-around by using a uniform variable, but I wanted to check anyway.

I have checked the GLSL QuickRef and there is no mention of viewport there. It just seems strange to me that it shouldn't be readily available.

Thanks,

T

earthquad
08-25-2009, 04:31 PM
not really. there are functions to retrieve texture dimensions though.