PDA

View Full Version : About drawing Sun (A strange "shadow")



s021126
03-03-2011, 05:35 AM
I try to draw a sun but I don't know why there is a "shadow" near the sun.. I mean the region near sun is darker rather than brighter!
And I have already set these:

emission:
glMaterialfv(GL_FRONT, GL_EMISSION, high_emission);

point light:
glLightfv(GL_LIGHT1, GL_POSITION, sun_pos);
glLightfv(GL_LIGHT1, GL_DIFFUSE, white_color);
glLightfv(GL_LIGHT1, GL_SPECULAR, white_color);
glEnable(GL_LIGHT1);

Here is the attached screenshot.Thank You

s021126
03-03-2011, 06:20 PM
Oh, Do I need to set up environment light in order to see the emission material effect?

_arts_
03-04-2011, 02:58 AM
emission doesn't lit anything, it doesn't cast ray of light. It is just a fake light. It's only purpose is to mimics a lighting object.

Detail more if you need more help.