Merging shaders in OpenGL?

Started by
2 comments, last by Wyrframe 5 years, 10 months ago

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?

Advertisement

ping?

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.

RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement