Lighting component
Supported nodes:
- DirectionalLight,
PointLight,
SpotLight
Note: VRML 2.0 SpotLight.beamWidth
idea cannot be translated to a standard
OpenGL spotlight, so if you set beamWidth < cutOffAngle then the light
will not look exactly VRML 2.0-spec compliant.
Honestly I don't see any sensible way to fix this
(as long as we talk about real-time rendering using OpenGL).
And other open-source VRML implementations rendering to OpenGL
also don't seem to do anything better.
VRML 2.0 spec requires that at least 8 lights
are supported. My units can support as many lights as are
allowed by your OpenGL implementation, which is at least 8.
TODO: global field from X3D is not supported for now. We handle this following VRML 97 spec, which means that the default global value is always used: directional lights are never global, positional/spot ligthts are always global.
|