Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Light ¶
type Light struct {
transform.Transform
Kind Kind
Point point.Point
// Color is the color of the light.
Color color.Color
// Intensity should be a value between 0.0 and 1.0 that determines the
// ammount of light contributed by this light. An intensity of 0.0
// effectively turns the light off while a value of 1.0 will add the
// value of the Color field to the face being lit.
Intensity intensity.Intensity
Normal point.Point
Enabled bool
}
Light object holds the attributes and transformation of a light source.
func AmbientLight ¶
func AmbientLight() Light
AmbientLight is a light that emits a constant amount of light everywhere at once. Transformation of the light has no effect.
func DefaultLights ¶
func DefaultLights() []*Light
DefaultLights are a set of lights to setup a standard Hollywood-style 3-part lighting
func DirectionalLight ¶
func DirectionalLight() Light
DirectionalLight is a light that emits light in parallel lines, not eminating from any single point. For these lights, only the Normal property is used to determine the direction of the light. This may also be transformed.
func PointLight ¶
func PointLight() Light
PointLight is a Light that emits light in all directions from a single point. The Point property determines the location of the point light. Note, though, that it may also be moved through the transformation of the light. A point light is also called an "Omni" light in some 3D editors.
func (Light) ShaderData ¶
func (l Light) ShaderData(model matrix.Matrix) (lsd ShaderData)
ShaderData pre-computes values necessary for shading.