
Untitled
By: a guest on
Apr 25th, 2012 | syntax:
None | size: 0.87 KB | hits: 22 | expires: Never
Exam
- Based on the orange book
- what do the names in, out, varying, uniform, in both fragment and vertex shader.
- what are uniform variables? - passed in from client code and does not change between vertices
- attribute keyword - a uniform that varies across vertices.
- Would you bring the current time in as a uniform or an attribute?
default attributes that you get
- vertex position, colour, normal
Vector of velocities? attribute!
attributes are variables which come in on a per vertex basis
whats the difference between sampler1D, sampler2D and sampler3D - a texture of X dimensions
texture, textureGrad, - all texture calls.
reflect, - takes 2 args - incoming vector, the normal - returns back reflected vector
refract - takes angle of incidence, normal, ratio of the index of refraction - returns refracted vector