Light

package
v0.0.0-...-9749107 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DirectionalLight_ubo_binding = 1
	DirectionalLight_fbo_type    = "shadowMap_directionalLight"
)
View Source
const (
	PointLight_ubo_binding = 2
	PointLight_fbo_type    = "shadowMap_pointLight"
)
View Source
const (
	SpotLight_ubo_binding = 3
	SpotLight_fbo_type    = "shadowMap_spotLight"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectionalLight

type DirectionalLight struct {
	DirectionalLight struct {
		Direction GeometryMath.Vector3 `yaml:"direction,flow"`
		Ambient   GeometryMath.Vector3 `yaml:"ambient,flow"`
		Diffuse   GeometryMath.Vector3 `yaml:"diffuse,flow"`
		Specular  GeometryMath.Vector3 `yaml:"specular,flow"`
	} `yaml:"directionalLight"`

	ShadowMap ShadowMapping.ShadowMap `yaml:"shadowMap"`
	Buffer.DynamicBufferData
}

func (*DirectionalLight) Draw

func (light *DirectionalLight) Draw(shader Shader.IShaderProgram, invoker Scene.IDrawable, scene Scene.IScene, camera Camera.ICamera) error

func (*DirectionalLight) GetBufferData

func (light *DirectionalLight) GetBufferData() interface{}

func (*DirectionalLight) UnmarshalYAML

func (light *DirectionalLight) UnmarshalYAML(value *yaml.Node) error

func (*DirectionalLight) Update

func (light *DirectionalLight) Update(direction GeometryMath.Vector3)

func (*DirectionalLight) UpdateCamera

func (light *DirectionalLight) UpdateCamera(scene Scene.IScene, camera Camera.ICamera)

type PointLight

type PointLight struct {
	PointLight struct {
		Position  GeometryMath.Vector3 `yaml:"position,flow"`
		Linear    float32              `yaml:"linear,flow"`
		Quadratic float32              `yaml:"quadratic,flow"`
		Ambient   GeometryMath.Vector3 `yaml:"ambient,flow"`
		Diffuse   GeometryMath.Vector3 `yaml:"diffuse,flow"`
		Specular  GeometryMath.Vector3 `yaml:"specular,flow"`
	} `yaml:"pointLight"`

	ShadowMap ShadowMapping.ShadowMap `yaml:"shadowMap"`
	Buffer.DynamicBufferData
}

func (*PointLight) Draw

func (light *PointLight) Draw(shader Shader.IShaderProgram, invoker Scene.IDrawable, scene Scene.IScene, camera Camera.ICamera) error

func (*PointLight) GetBufferData

func (light *PointLight) GetBufferData() interface{}

func (*PointLight) UnmarshalYAML

func (light *PointLight) UnmarshalYAML(value *yaml.Node) error

func (*PointLight) Update

func (light *PointLight) Update(position GeometryMath.Vector3)

func (*PointLight) UpdateCamera

func (light *PointLight) UpdateCamera(scene Scene.IScene, camera Camera.ICamera)

type SpotLight

type SpotLight struct {
	SpotLight struct {
		Position  GeometryMath.Vector3 `yaml:"position,flow"`
		Linear    float32              `yaml:"linear,flow"`
		Quadratic float32              `yaml:"quadratic,flow"`
		Ambient   GeometryMath.Vector3 `yaml:"ambient,flow"`
		Diffuse   GeometryMath.Vector3 `yaml:"diffuse,flow"`
		Specular  GeometryMath.Vector3 `yaml:"specular,flow"`
		Direction GeometryMath.Vector3 `yaml:"direction,flow"`
		InnerCone float32              `yaml:"innerCone"`
		OuterCone float32              `yaml:"outerCone"`
	} `yaml:"spotLight"`

	ShadowMap ShadowMapping.ShadowMap `yaml:"shadowMap"`
	Buffer.DynamicBufferData
}

func (*SpotLight) Draw

func (light *SpotLight) Draw(shader Shader.IShaderProgram, invoker Scene.IDrawable, scene Scene.IScene, camera Camera.ICamera) error

func (*SpotLight) GetBufferData

func (light *SpotLight) GetBufferData() interface{}

func (*SpotLight) UnmarshalYAML

func (light *SpotLight) UnmarshalYAML(value *yaml.Node) error

func (*SpotLight) Update

func (light *SpotLight) Update(position GeometryMath.Vector3, front GeometryMath.Vector3, up GeometryMath.Vector3)

func (*SpotLight) UpdateCamera

func (light *SpotLight) UpdateCamera(scene Scene.IScene, camera Camera.ICamera)

type UniformBufferArray

type UniformBufferArray struct {
	// contains filtered or unexported fields
}
var (
	DirectionalLightArray  UniformBufferArray
	DirectionalLightBuffer Buffer.UniformBuffer
)
var (
	PointLightBuffer Buffer.UniformBuffer
	PointLightArray  UniformBufferArray
)
var (
	SpotLightBuffer Buffer.UniformBuffer
	SpotLightArray  UniformBufferArray
)

func (*UniformBufferArray) Add

func (*UniformBufferArray) GetBufferData

func (array *UniformBufferArray) GetBufferData() interface{}

func (*UniformBufferArray) IsSync

func (array *UniformBufferArray) IsSync() bool

func (*UniformBufferArray) SetIsSync

func (array *UniformBufferArray) SetIsSync(val bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL