Skip to content
Procedural/algorithmic Textures
C Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets/gfx
src
1b_thumb.jpg
1c_thumb.jpg
1d_thumb.jpg
1f_thumb.jpg
1g_thumb.jpg
1h_thumb.jpg
2_thumb.jpg
3.gif
Makefile
README.md

README.md

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.

Useful links:
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

Screenshots:
1b1c1d1f1g1h23

                                      Get in touch on SDL-Discourse

Annotation:
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.

You can’t perform that action at this time.