Hot answers tagged

2

You'll need some persistent state and a frame counter passed in: float lightning(lightningState* state, uint64 frame){ if(!state->enabled) return 0.0f; if(frame - state->lastStart < state->flashDuration) // during flash return 1.0f; //can also have a decreasing function here based on the difference if(frame - state-...


1

Spaces and Matrices First of all, as you know, we use matrices to represent and to do coordinate transformations. They can be any of the affine transformations. That includes translation, scaling, rotation, shear, and reflection transformations. We (traditionally) have three coordinate systems to work with: Model space (Sometimes called "Object space"): ...


Only top voted, non community-wiki answers of a minimum length are eligible