Documentation ¶
Index ¶
- Constants
- type ArmatureUniform
- type BloomBlurUniform
- type CameraUniform
- type DirectionalShadowMap
- type DirectionalShadowMapCascade
- type DirectionalShadowMapRef
- type LightUniform
- type MaterialRenderPass
- type MaterialUniform
- type MeshRenderPass
- type MeshRenderPassType
- type ModelUniform
- type PointShadowMap
- type PostprocessUniform
- type PropertyKind
- type RenderPassPipelineInfo
- type Shader
- type ShaderMeshInfo
- type ShaderProgramCodeInfo
- type Shape
- type SkyLayerDefinition
- type SkyPipelineInfo
- type SpotShadowMap
- type TextureSet
- func (t *TextureSet) Sampler(name string) render.Sampler
- func (t *TextureSet) SamplerAt(index int) render.Sampler
- func (t *TextureSet) SetSampler(name string, sampler render.Sampler)
- func (t *TextureSet) SetTexture(name string, texture render.Texture)
- func (t *TextureSet) Texture(name string) render.Texture
- func (t *TextureSet) TextureAt(index int) render.Texture
- func (t *TextureSet) TextureCount() int
- type UniformProperty
- type UniformSet
Constants ¶
View Source
const ( CoordAttributeIndex = 0 NormalAttributeIndex = 1 TangentAttributeIndex = 2 TexCoordAttributeIndex = 3 ColorAttributeIndex = 4 WeightsAttributeIndex = 5 JointsAttributeIndex = 6 )
View Source
const ( UniformBufferBindingCamera = 0 UniformBufferBindingModel = 1 UniformBufferBindingMaterial = 2 UniformBufferBindingArmature = 3 UniformBufferBindingLight = 4 UniformBufferBindingPostprocess = 6 UniformBufferBindingBloom = 7 )
View Source
const ( TextureBindingGeometryAlbedoTexture = 0 TextureBindingLightingFramebufferColor0 = 0 TextureBindingLightingFramebufferColor1 = 1 TextureBindingLightingFramebufferDepth = 3 TextureBindingLightingReflectionTexture = 4 TextureBindingLightingRefractionTexture = 5 TextureBindingLightingShadowMap = 4 TextureBindingPostprocessFramebufferColor0 = 0 TextureBindingPostprocessBloom = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArmatureUniform ¶ added in v0.19.0
type ArmatureUniform struct {
BoneMatrices []byte
}
func (ArmatureUniform) Std140Plot ¶ added in v0.19.0
func (u ArmatureUniform) Std140Plot(plotter *blob.Plotter)
func (ArmatureUniform) Std140Size ¶ added in v0.19.0
func (u ArmatureUniform) Std140Size() uint32
type BloomBlurUniform ¶ added in v0.19.0
type BloomBlurUniform struct {
Horizontal float32
}
func (BloomBlurUniform) Std140Plot ¶ added in v0.19.0
func (u BloomBlurUniform) Std140Plot(plotter *blob.Plotter)
func (BloomBlurUniform) Std140Size ¶ added in v0.19.0
func (u BloomBlurUniform) Std140Size() uint32
type CameraUniform ¶ added in v0.17.0
type CameraUniform struct { ProjectionMatrix sprec.Mat4 ViewMatrix sprec.Mat4 CameraMatrix sprec.Mat4 Viewport sprec.Vec4 Time float32 }
func (CameraUniform) Std140Plot ¶ added in v0.17.0
func (u CameraUniform) Std140Plot(plotter *blob.Plotter)
func (CameraUniform) Std140Size ¶ added in v0.17.0
func (u CameraUniform) Std140Size() uint32
type DirectionalShadowMap ¶ added in v0.20.0
type DirectionalShadowMap struct { ArrayTexture render.Texture Cascades []DirectionalShadowMapCascade }
type DirectionalShadowMapCascade ¶ added in v0.20.0
type DirectionalShadowMapRef ¶ added in v0.20.0
type DirectionalShadowMapRef struct {
DirectionalShadowMap
}
type LightUniform ¶ added in v0.17.0
type LightUniform struct { ShadowMatrices [4]sprec.Mat4 ModelMatrix sprec.Mat4 ShadowCascades [4]sprec.Vec2 Color sprec.Vec3 Intensity float32 Range float32 OuterAngle float32 InnerAngle float32 }
func (LightUniform) Std140Plot ¶ added in v0.17.0
func (u LightUniform) Std140Plot(plotter *blob.Plotter)
func (LightUniform) Std140Size ¶ added in v0.17.0
func (u LightUniform) Std140Size() uint32
type MaterialRenderPass ¶ added in v0.19.0
type MaterialRenderPass struct { Layer int32 Culling render.CullMode FrontFace render.FaceOrientation DepthTest bool DepthWrite bool DepthComparison render.Comparison Blending bool TextureSet TextureSet UniformSet UniformSet // TODO: Add blending Shader *lsl.Shader }
type MaterialUniform ¶ added in v0.17.0
type MaterialUniform struct {
Data []byte
}
func (MaterialUniform) Std140Plot ¶ added in v0.17.0
func (u MaterialUniform) Std140Plot(plotter *blob.Plotter)
func (MaterialUniform) Std140Size ¶ added in v0.17.0
func (u MaterialUniform) Std140Size() uint32
type MeshRenderPass ¶ added in v0.19.0
type MeshRenderPass struct { Layer int32 Program render.Program Pipeline render.Pipeline IndexByteOffset uint32 IndexCount uint32 Key uint32 TextureSet TextureSet UniformSet UniformSet }
type MeshRenderPassType ¶ added in v0.19.0
type MeshRenderPassType uint8
const ( MeshRenderPassTypeShadow MeshRenderPassType = iota MeshRenderPassTypeGeometry MeshRenderPassTypeForward MeshRenderPassTypeSky MeshRenderPassTypePostprocess MeshRenderPassTypeCount )
type ModelUniform ¶ added in v0.17.0
type ModelUniform struct {
ModelMatrices []byte
}
func (ModelUniform) Std140Plot ¶ added in v0.17.0
func (u ModelUniform) Std140Plot(plotter *blob.Plotter)
func (ModelUniform) Std140Size ¶ added in v0.17.0
func (u ModelUniform) Std140Size() uint32
type PointShadowMap ¶ added in v0.20.0
type PointShadowMap struct { ArrayTexture render.Texture Framebuffers [6]render.Framebuffer }
type PostprocessUniform ¶ added in v0.16.0
type PostprocessUniform struct {
Exposure float32
}
func (PostprocessUniform) Std140Plot ¶ added in v0.17.0
func (u PostprocessUniform) Std140Plot(plotter *blob.Plotter)
func (PostprocessUniform) Std140Size ¶ added in v0.16.0
func (u PostprocessUniform) Std140Size() uint32
type PropertyKind ¶ added in v0.19.0
type PropertyKind uint8
const ( PropertyKindUnknown PropertyKind = iota PropertyKindFloat PropertyKindVec2 PropertyKindVec3 PropertyKindVec4 )
func ResolvePropertyKind ¶ added in v0.19.0
func ResolvePropertyKind(value any) PropertyKind
type RenderPassPipelineInfo ¶ added in v0.19.0
type RenderPassPipelineInfo struct { Program render.Program MeshVertexArray render.VertexArray FragmentTopology render.Topology PassDefinition MaterialRenderPass }
type Shader ¶ added in v0.19.0
type Shader interface {
CreateProgramCode(info ShaderProgramCodeInfo) render.ProgramCode
}
type ShaderMeshInfo ¶ added in v0.19.0
type ShaderProgramCodeInfo ¶ added in v0.19.0
type ShaderProgramCodeInfo struct {
ShaderMeshInfo
}
type Shape ¶ added in v0.9.0
type Shape struct {
// contains filtered or unexported fields
}
Shape defines a simple 3D mesh that does not have any materials.
func CreateConeShape ¶ added in v0.10.0
func CreateCubeShape ¶ added in v0.9.0
func CreateQuadShape ¶ added in v0.9.0
func CreateSphereShape ¶ added in v0.10.0
func (*Shape) IndexCount ¶ added in v0.9.0
IndexCount returns the number of indices that comprise this Shape.
func (*Shape) Release ¶ added in v0.9.0
func (s *Shape) Release()
Release releases all resources allocated by this Shape.
func (*Shape) VertexArray ¶ added in v0.9.0
func (s *Shape) VertexArray() render.VertexArray
VertexArray returns the VertexArray that contains the vertices and indices for this Shape.
type SkyLayerDefinition ¶ added in v0.19.0
type SkyLayerDefinition struct { TextureSet TextureSet UniformSet UniformSet Program render.Program Pipeline render.Pipeline IndexByteOffset uint32 IndexCount uint32 }
func (*SkyLayerDefinition) Delete ¶ added in v0.19.0
func (d *SkyLayerDefinition) Delete()
type SkyPipelineInfo ¶ added in v0.19.0
type SpotShadowMap ¶ added in v0.20.0
type SpotShadowMap struct { Texture render.Texture Framebuffer render.Framebuffer }
type TextureSet ¶ added in v0.19.0
type TextureSet struct {
// contains filtered or unexported fields
}
func NewShaderTextureSet ¶ added in v0.19.0
func NewShaderTextureSet(shader *lsl.Shader) TextureSet
func (*TextureSet) Sampler ¶ added in v0.19.0
func (t *TextureSet) Sampler(name string) render.Sampler
func (*TextureSet) SamplerAt ¶ added in v0.19.0
func (t *TextureSet) SamplerAt(index int) render.Sampler
func (*TextureSet) SetSampler ¶ added in v0.19.0
func (t *TextureSet) SetSampler(name string, sampler render.Sampler)
func (*TextureSet) SetTexture ¶ added in v0.19.0
func (t *TextureSet) SetTexture(name string, texture render.Texture)
func (*TextureSet) Texture ¶ added in v0.19.0
func (t *TextureSet) Texture(name string) render.Texture
func (*TextureSet) TextureAt ¶ added in v0.19.0
func (t *TextureSet) TextureAt(index int) render.Texture
func (*TextureSet) TextureCount ¶ added in v0.19.0
func (t *TextureSet) TextureCount() int
type UniformProperty ¶ added in v0.19.0
type UniformProperty struct {
// contains filtered or unexported fields
}
type UniformSet ¶ added in v0.19.0
type UniformSet struct {
// contains filtered or unexported fields
}
func NewShaderUniformSet ¶ added in v0.19.0
func NewShaderUniformSet(shader *lsl.Shader) UniformSet
func (*UniformSet) Data ¶ added in v0.19.0
func (s *UniformSet) Data() []byte
func (*UniformSet) IsEmpty ¶ added in v0.19.0
func (s *UniformSet) IsEmpty() bool
func (*UniformSet) Property ¶ added in v0.19.0
func (s *UniformSet) Property(name string) any
func (*UniformSet) SetProperty ¶ added in v0.19.0
func (s *UniformSet) SetProperty(name string, value any)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.