Skip to main content
GameDev.net gamedev.net
🔒 Locked

Render Passes

Started by Silly_con May 4, 2003 at 9:14 AM 6 replies 950+ views
Original Post
Silly_con
Silly_con
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
Yoshy
Yoshy
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

_____________________

_____________________
Silly_con
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?
Outworlder
Outworlder
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.
Gaiomard Dragon-===(UDIC)===-
michel
michel
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?
blizzard999
blizzard999
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 )

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.