Jump to content
  • Advertisement

Archived

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

Hardguy

Software RGB lightning?

This topic is 6922 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

Does any one now how to do FAST software rbg lightning in highcolor? I have mannaged to do it fast only using white light. How do they do it so fast in games like Half-life and Unreal? ------- Hardguy Currently developing Fiend. A horror as never seen before. fiend.ingava.com

Share this post


Link to post
Share on other sites
Advertisement
Most likely they have one or more assembler guru's that are able to optimize the code for them.

More importantly you must sacrifice accuracy to gain speed. Many times you can find good approximations that to the human eye looks just as good.

- WitchLord

Edited by - WitchLord on May 12, 2000 5:43:23 PM

Share this post


Link to post
Share on other sites
well.. here''s a hint. white light gouraud can be implemented in software with one div per triangle, no looped divs (or you could do no divs per poly with a lookup table but that would probably be slower on current machines). that means that rgb gouraud only requires three divisions per triangle. the way most people have their software rasterizers set up is they have one or two looped divisions plus like seven divisions before the loop, which obviously adds up, especially if you do it three times for the same polygon.
i wont explain the algorithm here because it''s sort of lengthy and all you''d really need to figure out how to do it is the first two or three chapters of any high school calculus book. if enough people ask for it, i''ll write up a doc and post it here or on flipcode or whatever.

-goltrpoat




--
Float like a butterfly, bite like a crocodile.

Share this post


Link to post
Share on other sites
What I am after is ways to optimize the code where
you blend the lightmap with the source (a texture or whatever). the formula is something like:

src_red=(lightmap_red/255) * src_red
src_green=(lightmap_green/255) * src_green
src_blue=(lightmap_blue/255) * src_blue


I've made I program where you put these calutations in a
look up table (only 256x256) and optimized it using assembly but it still is very slow.

Does anyone have clue how you can make this go fast?

-------
Hardguy

Currently developing Fiend.
A horror as never seen before.

fiend.ingava.com


Edited by - Hardguy on May 13, 2000 6:35:27 AM

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!