CameraPosition in GLSL

Started by
1 comment, last by GeirGrusom 13 years, 8 months ago
I'm in a GLSL shader and I would like to have the camera position.

Preferably I would like not having to feed it through a variable.
Is it stored somewhere or is there a quick way to compute it ?
Advertisement
there are no other way of doing it other than uniforms especially if you use opengl 3.x or newer
Camera position can be inferred from the viewport matrix.

This topic is closed to new replies.

Advertisement