uniform

package
v0.0.0-...-8e5a076 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const LightPadding = 74
View Source
const MaxTextures = 16
View Source
const ShadowCascades = 4

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	Proj        mat4.T
	View        mat4.T
	ViewProj    mat4.T
	ProjInv     mat4.T
	ViewInv     mat4.T
	ViewProjInv mat4.T
	Eye         vec4.T
	Forward     vec4.T
	Viewport    vec2.T
	Delta       float32
	Time        float32
	// contains filtered or unexported fields
}

func CameraFromArgs

func CameraFromArgs(args draw.Args) Camera

type Light

type Light struct {
	ViewProj  [ShadowCascades]mat4.T
	Shadowmap [ShadowCascades]uint32
	Distance  [ShadowCascades]float32
	Color     color.T
	Position  vec4.T
	Type      uint32
	Intensity float32
	Range     float32
	Falloff   float32
	// contains filtered or unexported fields
}

type LightBuffer

type LightBuffer struct {
	// contains filtered or unexported fields
}

func NewLightBuffer

func NewLightBuffer(capacity int) *LightBuffer

func (*LightBuffer) Flush

func (b *LightBuffer) Flush(desc *descriptor.Storage[Light])

func (*LightBuffer) Reset

func (b *LightBuffer) Reset()

func (*LightBuffer) Size

func (b *LightBuffer) Size() int

func (*LightBuffer) Store

func (b *LightBuffer) Store(light Light)

type LightSettings

type LightSettings struct {
	AmbientColor       color.T
	AmbientIntensity   float32
	Count              int32
	ShadowSamples      int32
	ShadowSampleRadius float32
	ShadowBias         float32
	NormalOffset       float32
	// contains filtered or unexported fields
}

type Object

type Object struct {
	Model    mat4.T
	Textures TextureIds

	Vertices device.Address
	Indices  device.Address
	// contains filtered or unexported fields
}

type ObjectBuffer

type ObjectBuffer struct {
	// contains filtered or unexported fields
}

func NewObjectBuffer

func NewObjectBuffer(capacity int) *ObjectBuffer

func (*ObjectBuffer) Flush

func (b *ObjectBuffer) Flush(desc *descriptor.Storage[Object])

func (*ObjectBuffer) Reset

func (b *ObjectBuffer) Reset()

func (*ObjectBuffer) Size

func (b *ObjectBuffer) Size() int

func (*ObjectBuffer) Store

func (b *ObjectBuffer) Store(obj Object) int

type TextureId

type TextureId uint32

type TextureIds

type TextureIds [MaxTextures]TextureId

Jump to

Keyboard shortcuts

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