![]() |
![]() |
OpenGL Shading Language Tutorials |
Simple Simulation of a bumpy Surface
This tutorial shows how to put a pattern on an object/light without using textures. Vertex Shader:
We create our pattern with this function:
This pattern gives a certain 'noise' effect. (however, the noise factor is defined by the total amount of vertices, try it on a cube).
The pattern is added to the specular value, this way we get the impression of a bumpy surface.
|
|
© 2003 by Martin Christen. All Rights Reserved. |