This is a small C-SDL series about procedural textures.
The Code demonstrates how to...
- render noise (1).
- save a screenshot (1b).
- smooth noise (1c).
- add turbulence (1d).
- change turbulence with mousewheel (0-255) (1e).
- render Clouds - HSLtoRGB, change turbulence with mousewheel (0-255) (1f).
- generate a Marble Texture (1g).
- generate a Wood Texture (1h).
- add some more mathematical 2D functions (2).
Use mousewheel to change drawing function.
- render 3D Random Noise animated with a function of time (3).
Press s to save the image.
Lode's Computer Graphics Tutorial - Texture Generation using Random Noise
* parts of his code are used with permission.
SDL2 | SDL-Discourse | More SDL2 Example Code
This Code is a tribute to Lode's Computer Graphics Tutorial which I appreciate very much.
A practical (concrete) primer into computer graphics.
* * *
Real time computation of those graphics are pretty cpu-heavy and way faster using the GPU.
You may consider a hardware accelerated API like Vulkan or OpenGL.