Archived

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

Silly_con

Render Passes

Recommended Posts

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