Global variables such as view_position, light0, etc..

Short answer: the ones that you need them to be :)
Longer one: it's all programmable nowadays, so what are the spaces, what are the calculations etc. it's all up to you. Several common approaches are:
1. lights in world space. Then you have to xfrom your normals into world space in a vertex shader for each vertex.
2. lights in object space. Then you have to xfrom lights into object space before rendering each object.
Each has pros and cons, as always :) Ditto with eye position and other things.
 
Back
Top