Archived

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

Hippie Hunter

geforce lighting

Recommended Posts

a person    118
depends on the card, check your cards caps. most i think only handle 8. (ie using mulitplass rendering you can use more). a geforce3 handles 8.

Share this post


Link to post
Share on other sites
juhaszt    122
from the documentation:

To perform multipass texture blending in a C++ application

1. Set a texture in texture stage 0 by calling the IDirect3DDevice8::SetTexture method.
2. Select the desired color and alpha blending arguments and operations with the IDirect3DDevice8::SetTextureStageState method. The default settings are well-suited for multipass texture blending.
3. Render the appropriate objects in the scene.
4. Set the next texture in texture stage 0.
5. Set the D3DRS_SRCBLEND and D3DRS_DESTBLEND render states to adjust the source and destination blending factors as needed. The system blends the new textures with the existing pixels in the render-target surface according to these parameters.
6. Repeat Steps 3, 4, and 5 with as many textures as needed.

Share this post


Link to post
Share on other sites
g_fire_1983    122
I was going to mention a similar thing. My team have got a great engine up and running using VB and D3D8 and it uses only light maps.

However, it seems it''s quite awkard to design light maps that look good so I was going to reinvestigate the idea of using the Direct3D Lights.

How useful are these lights in a real time application? Are they just crap performance munchers or do the pro''s use them?

I''m interested by this idea of using the multi-pass texturing. I''ve used the multi-stage texturing for the light maps and decals etc and I understand what your getting at but how does this enable you to break the eight light limit? Do you render some parts, move the lights and then render again or what?

Are these D3D Lights any good or am I going to have to get my math text book out and write an uber lighting renderer for my little engine?

Share this post


Link to post
Share on other sites
juhaszt    122
When you want to use more than 8 dynamic light sources you can switch them on and off during rendering depending the distance of the light source from the rendered object. I don''t know better solution.
Of course you can choose software T&L and then you are not limited with 8 light sources :-) Let''s not talk about its performance...

For dynamic lighting D3D lights work fine I think, just the models need higher polygon resolution to look fine. It is not easy to use light maps for complex models I think...

Share this post


Link to post
Share on other sites