-3

I'm currently reading the "official" opengl guide book and their explanations and example codes are way too complex for me. I think I got the idea of procedural texturing, but I can't find any fine tutorial about them. Does anyone know a good guide on that subject? Or maybe explain it a little bit?

McLovin
  • 3,295
  • 7
  • 32
  • 67
  • I am not sure what level of explanation you want. You can create a procedural texture by creating a texture and a valid frame buffer, assigning the texture as a color buffer on the frame buffer, binding the frame buffer, and drawing using OpenGL just as you would draw to the screen (and there are other, older techniques too). You use it by unbinding the frame buffer, and binding the color buffer texture just like you would any other texture. [This wiki entry](https://www.opengl.org/wiki/Framebuffer_Object_Examples) should help. – Justin Jan 05 '15 at 13:52

1 Answers1

0

This book is the best on the subject:

Texturing and Modeling: A Procedural Approach

It is not API specific so you won't find any OpenGL examples but it does go in depth about techniques for procedural texturing.

Another great resource for examples of procedural graphics is this:

Shadertoy (note that it works best with Google Chrome)

It is a fantastic collection of WebGL fragment shaders (WebGL is based on OpenGL).

Ville Krumlinde
  • 7,021
  • 1
  • 33
  • 41
  • How do I set up the (2D ?) texture before rendering? Normally? Also why do they only use the t coordinate of the texture? why is the s coordinate unnecessary? – McLovin Jan 04 '15 at 16:27
  • @Pilpel Which example where they only use t coordinate do you refer to? For basic texture mapping using modern OpenGL there are many tutorials, like this one: http://ogldev.atspace.co.uk/www/tutorial16/tutorial16.html – Ville Krumlinde Jan 04 '15 at 17:49
  • But that's "normal" texturing. From what I understand procedural texturing is the process of creating a 2D image from algorithms and not from normal image rgb data. – McLovin Jan 04 '15 at 19:14