Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Silly_con

Render Passes

This topic is 5581 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 heard the people tell: " I render this in one pass... I render the shadows in two passes ..." but I don''t know what means the passes, and how I can measure it

Share this post


Link to post
Share on other sites
Advertisement
It''s the number of times you draw your geometri (completly; I don''t think a part of the screen counts);

Lets say you''re on a card that donesn''t have multitexturing and you want to render a lightmap on a texteured quad. Now you will have to do sometihing like this:

1. Bind appropriate texture (Diffuse texture)
2. Send quad
3. set blending mode
4. bind lightmap texture
5. Send quad
6. swap buffers
7. Reset blending modes

Here, I have 2 passes; since I sended the quad 2 times (considering that the quad is the only thing I draw).

I hope this clears it a bit. and I hope I''m right :D

_____________________

Share this post


Link to post
Share on other sites
I still haven''t it clear... when I know that I have send geometry?, if I draw for example 4 boxes in the render function, I send geometry to the card 4 times?

Share this post


Link to post
Share on other sites
quote:
Original post by Silly_con
I still haven''t it clear... when I know that I have send geometry?, if I draw for example 4 boxes in the render function, I send geometry to the card 4 times?


He is talking about how many times you have sent the "same" geometry.

In your example, if you have 4 different boxes, than you have sent all of them just once. But if you send all four again, then you have sent them twice.

Share this post


Link to post
Share on other sites
It''s like if you have a 3d terrain and you want to have grass and rock structures:
You have to blend these 2 texture patterns on the terrain.
If you first draw the grass texture with some parts invisible (blended) and then the rock texture on the invisible parts, then you are rendering in 2 passes.
For one and the same thing, the terrain color, you pass 2 textures to the card, where there could be one.
If you would render it with one texture it would be a one pass.
Get it?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
what I can''t understand is, why you do not combine these two textures in a programm and then just bind this texture on the terrain

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
thatd take too much ram, and it would appear ''stretched''

Share this post


Link to post
Share on other sites
No becausewhen you have combined two texture in a single one...you have lost your textures
Of course if you need to blend the same two textures every time it''s OK.
In practice it''s common to use a single texture for multiple polygons combined (multipass) with a second texture that can be diferent for every polygon (the best example: light map )

Share this post


Link to post
Share on other sites

  • 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!