Jump to content
  • Advertisement


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


Light HOW?

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

Hi all, I would like ask a simple question. Let''s say I did not like the DirectX or Opengl (or another) API''s or engine''s lightning structure, and I want to do this by msyself. How could I do this at the end? Ok. Bizzare question. I will explain. I have projected each point on to the screen, then using some math model I have calculated each intensities at these pixels. So how can I interact the intensity and the color information at each pixel? At first I think that RGB can be represented as Hue, Saturation and Intensity. So the OuputIntensity = LightIntensity* PixelColorIntensity is true or not?

Share this post

Link to post
Share on other sites
So if I understand you...
you have two bitmaps (in effect)
one representing the raw colour data of the image,
and another representing the required lighting intensity.
simply multiply the first image, by the second... ie:
say for a pixel, colours were r,g,b and the intensity required was i...
where r'',g'', and b'' are the output colours... this operation can be carried out quickly, using MMX, but it should be done, per byte, not per pixel, for 8/24/32 bit screens.... it has to be done per pixel for 16 bit however (well, sort of_)

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!