GLSL and Irrlicht Ambient color lighting.

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

I don't know but by running this simple shader I have found that it is some value close but not equal to 0.0 on my system. So it probably can't serve purpose of determining if fog is on or off.

Code: Select all

void main()
{
   gl_Position = ftransform();

   gl_FrontColor = vec4(1,1,1,1);
   if(gl_Fog.scale < 0.0) gl_FrontColor = vec4(0,0,1,1);
   if(gl_Fog.scale == 0.0) gl_FrontColor = vec4(1,0,0,1);
   if(gl_Fog.scale < 0.03) gl_FrontColor = vec4(0,1,0,1);
}
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

I took a screenie of the spotlight program.

Image
Image
Post Reply