Jump to content
  • Advertisement
Sign in to follow this  
serious_learner07

OpenGL Multi pass rendering

This topic is 3849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to try out multipass Rendering. In First pass: diffuse lighting, second pass: specular highlight and in third pass some kind of reflection. In first place is it possible to do? If so, I have three more questions 1. Whether all these passes are calculated in a single Frame(of the displayFunction) or in several frames. 2. How different it is implementing multipass Rendering in GLSL ( shader languages) from OpenGL(fixed pipeline) 3. Does MultiPass Rendering affects the performance. Please explain. I am learning fundamentals of Multipass Rendering. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by serious_learner07

I want to try out multipass Rendering. In First pass: diffuse lighting,
second pass: specular highlight and in third pass some kind of reflection.

In first place is it possible to do? If so, I have three more questions


yes, it's possible. Diffuse, specular and reflected light is usually simply added, and addition is supported by alpha blending.

Quote:

1. Whether all these passes are calculated in a single Frame(of the displayFunction) or in several frames.

One frame, if you mean "frame" like in "frames per second". But of course you need several draw calls (commonly called "batches"), one per pass.

Quote:

2. How different it is implementing multipass Rendering in GLSL ( shader languages) from OpenGL(fixed pipeline)


No differences. Alpha Blending is used to combine multiple passes, which works the same way for both worlds.

Quote:

3. Does MultiPass Rendering affects the performance.

Yes. It poses an additional burden to both the GPU and the CPU. If you're using shaders anyways, do the diffuse, specular and reflection calculation all in one shader, add up all light contributions in that shader and output only the final result.

Bye, Thomas

Share this post


Link to post
Share on other sites
Wtf need you examples for? If you render an object the second time, that's another pass. The alpha blending settings determine, how both passes will be combined. Look up alpha blending on google to get a hold on it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!