Advertisement

2 questions about lighting...

Started by June 17, 2004 01:59 AM
13 comments, last by vincoof 20 years, 5 months ago
Quote: Original post by rodzilla
Is there a faster solution than the LIT instruction to get full-featured lighting ?

Yes it's called per-vertex lighting ;)
j/k

On many hardware, it's faster to lookup a texture than computing complex operations such as exponents.

Also, make sure you compute the half-angle vector locally instead of using the infinite half-angle vector.


@vincoof: I'm really not sure I wanna get back to per-vertex lighting...
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
Advertisement
lmao :)

Do you use per-pixel shininess here ?
It would be useful for instance for the ground, where concrete should not be as shiny as le carrelage (désolé j'ai la flemme de traduire)

Also, you seem to use strongly bumped surfaces. Parallax mapping would give neat effects too.

Both effects are quite easy to setup in fragment programs.

Just something to meditate ;)

by-the-way, the picture looks very nice. congrats dude [grin]

[Edited by - vincoof on June 18, 2004 6:46:46 PM]
No per_pixel shininess yet. That's the next step.

And then I think I'll have to google for parallax mapping since I don't have a clue about this.

(edit) Hey ! Google pointed me to a paper dedicated to parallax mapping with VP/FP source code...



This one features full lighting, normal mapping, a gloss map (on the floor) and parallax mapping at a whooping 15 FPS on my geForceFX 5200 card ;(

[Edited by - rodzilla on June 19, 2004 3:35:04 AM]
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
I told you parallax was easy to implement. But what I didn't tell you is that VP/FP code was already available [grin]
The parallax looks very nice on the walls :)

As for the framerate, I'm afraid that's the kind of speed you should expect from a FX5200.
Probably you could speed up a bit if you disabled parallax mapping on the floor, which doesn't really need parallax. Parallax mapping is best seen on surfaces that have strong bumps (like the walls in your screenshot).

This topic is closed to new replies.

Advertisement