Where spotdirection is a field from the ligth state see here lightdir is the vector from the light source to the vertex and spotexp is the spot rate of decay.
Opengl point light penetrates walls.
For example if you have a white light in a room with red walls the scattered light tends to be red although the light directly striking objects is white.
This is also provided by the opengl state see here and controls how the lights intensity decays from the center of the cone it its borders the larger the value the faster de decay with zero meaning constant light within the light.
It basically sets the colour.
If any part of the cone is on the other side of the wall it will light that area.
The technique we re using is perfect for point lights as a real point light would cast shadows in all directions.
The angle at which light from a point light source hits an object is a function of the positions of both the object and the light source.
Point light a light that gives off equal amounts of light in all directions.
Ambient lighting gives some light to shaded objects which in reality would be due to scattering and diffusion of light shadows are rarely totally black without ambience the scene would be too dark altering global ambience.
Pname specifies one of ten light source parameters again by symbolic name params is either a single value or a pointer to an array that contains the new values.
Polygons and parts of polygons which are closer to the light appear brighter than those that are further away.
In addition to specific point lights in precise locations we have global ambience.
Ambient reflection is a gross approximation of multiple reflections from indirect light sources e g the surfaces of walls and tables in a room that reflect off the lights from light sources.
I have an idea to try using a cookie to darken half the cone i hope that takes it the other 30 of the way.
Ambient reflection produces a constant illumination on all surface regardless of their orientation.
Gllight sets the values of individual light source parameters light names the light and is a symbolic name of the form gl light i where i ranges from 0 to the value of gl max lights 1.
Opengl allows you to set the red green and blue values for each component of light independently.
A diffuse light is just a coloured light and handles the diffuse term for lighting.
That spotlight is on the other side of the wall and while hard soft shadows does mitigate it it doesn t resolve it completely.
This technique is known as point light shadows or more formerly as omnidirectional shadow maps.