ShadowMapping

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShadowMapDirectionalLight core.Type = "shadowMapDirectionalLight"
	ShadowMapPointLight       core.Type = "shadowMapPointLight"
	ShadowMapSpotLight        core.Type = "shadowMapSpotLight"
)

Variables

This section is empty.

Functions

func NewIShaderProgram

func NewIShaderProgram(vertexShaderFiles []string, fragmentShaderFiles []string, geometryShaderFiles []string) (Shader.IShaderProgram, error)

func NewShadowCubeMapTexture

func NewShadowCubeMapTexture(width int32, height int32, textureType core.Type) (*core.Texture, error)

func NewShadowMapTexture

func NewShadowMapTexture(width int32, height int32, textureType core.Type) (*core.Texture, error)

Types

type ShaderComponent

type ShaderComponent struct {
	*Shader.ShaderProgramCore
}

func (*ShaderComponent) BindObject

func (program *ShaderComponent) BindObject(i interface{}) error

func (*ShaderComponent) GetUniformAddress

func (program *ShaderComponent) GetUniformAddress(i interface{}) (string, error)

type ShaderProgram

type ShaderProgram struct {
	*Shader.ShaderProgramCore
	MaterialShader Material.ShaderProgram
}

func NewShaderProgram

func NewShaderProgram(vertexShaderFiles []string, fragmentShaderFiles []string, geometryShaderFiles []string) (*ShaderProgram, error)

func (*ShaderProgram) BindObject

func (program *ShaderProgram) BindObject(i interface{}) error

func (*ShaderProgram) GetUniformAddress

func (program *ShaderProgram) GetUniformAddress(i interface{}) (string, error)

type ShadowMap

type ShadowMap struct {
	Camera               Camera.ICamera
	UpdateCameraCallback func(scene Scene.IScene, camera Camera.ICamera)

	Shader      Shader.IShaderProgram
	FrameBuffer FrameBuffer.FrameBuffer
	LightIndex  int

	Distance           float32
	TransitionDistance float32

	TextureConstructor func(width int32, height int32, textureType core.Type) (*core.Texture, error)
	TextureType        core.Type
}

func (*ShadowMap) Draw

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

func (*ShadowMap) UnmarshalYAML

func (shadowMap *ShadowMap) UnmarshalYAML(value *yaml.Node) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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