Game Development Reference
In-Depth Information
This is the initialization part, where we create the shader and the sprite, which will use it.
We also set all of the uniforms (except the time, which will have to change for each
frame) to reasonable values. The actual rendering looks like this:
Notice that we can set uniforms before each object draw call (in this case it is only the
time). That means that we can have the same shader for multiple types of objects by chan-
ging some of the parameter values.
The effect of the current shader is a wobble on the y -axis that goes through the whole
sprite:
Search WWH ::




Custom Search