I've just finished most tutorial steps on learnopengl.com and I'm really excited about starting to write very small model viewer. Unfortunately, I have no idea how to combine all the shaders in the examples that were given. I mean: how can I do the shadow mapping shader also work with the diffuse/normal one? Is that what render passes are? How is this usually structured in a rendering class?
Merging shaders in OpenGL?
If you're doing forward rendering, you probably need to learn GLSL and start putting your shaders together, yes.
If you're doing deferred rendering, then yes, that is what render passes are. You render the base opaque geometry to several off-screen textures, and then (to heavily simplify) feed those textures a "composite" shader which determines the actual color values that end up on-screen.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement