Documentation ¶
Overview ¶
Possible features
- render transparent back to front - render opaque front to back - stacking shaders - z-prepass (used when pixel shading is expensive - render scene with default pixel shader to generate depth buffer) - deferred rendering (lighting is done in later pass) - pre-pass lighting - forward + (tiled forward rendering)
Resources - https://tamats.com/learn/realtime-graphics/
Index ¶
- type AttributeType
- type Blend
- type Buffer
- type BufferAttribute
- type BufferFormat
- func (f *BufferFormat) Add(data DataType, size int, attr AttributeType) *BufferAttribute
- func (f *BufferFormat) AddColor(data DataType, size int) *BufferAttribute
- func (f *BufferFormat) AddGeneric(data DataType, size int) *BufferAttribute
- func (f *BufferFormat) AddNormal() *BufferAttribute
- func (f *BufferFormat) AddTexture() *BufferAttribute
- func (f *BufferFormat) AddVertex(data DataType, size int) *BufferAttribute
- func (f *BufferFormat) Create(capacity int) *Buffer
- func (f *BufferFormat) Get(attr AttributeType) *BufferAttribute
- type Coord
- type DataType
- type Frequency
- type Primitive
- type Texel
- type TexelUV
- type TexelXY
- type Texture
- func (tex *Texture) Coord(x, y float32) TextureCoord
- func (tex *Texture) Frames(width, height float32, topLeftCorners []Coord) []Tile
- func (tex *Texture) Grid(columns, rows, columnWidth, rowHeight, offsetX, offsetY int) [][]Tile
- func (tex *Texture) IsDefined() bool
- func (tex *Texture) Texel(x, y float32) Texel
- func (tex *Texture) Tile() Tile
- type TextureCoord
- type TextureInfo
- type Tile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeType ¶
type AttributeType int
const ( TypeVertex AttributeType = iota TypeColor TypeNormal TypeTexture TypeGeneric )
type BufferAttribute ¶
type BufferAttribute struct { Name string Data DataType Size int Type AttributeType Offset int Location int }
func (*BufferAttribute) SetName ¶
func (ba *BufferAttribute) SetName(name string)
type BufferFormat ¶
type BufferFormat struct { Attributes []BufferAttribute ByType [5]*BufferAttribute Stride int Frequency Frequency Draw, Read bool }
func (*BufferFormat) Add ¶
func (f *BufferFormat) Add(data DataType, size int, attr AttributeType) *BufferAttribute
func (*BufferFormat) AddColor ¶
func (f *BufferFormat) AddColor(data DataType, size int) *BufferAttribute
func (*BufferFormat) AddGeneric ¶
func (f *BufferFormat) AddGeneric(data DataType, size int) *BufferAttribute
func (*BufferFormat) AddNormal ¶
func (f *BufferFormat) AddNormal() *BufferAttribute
func (*BufferFormat) AddTexture ¶
func (f *BufferFormat) AddTexture() *BufferAttribute
func (*BufferFormat) AddVertex ¶
func (f *BufferFormat) AddVertex(data DataType, size int) *BufferAttribute
func (*BufferFormat) Create ¶
func (f *BufferFormat) Create(capacity int) *Buffer
func (*BufferFormat) Get ¶
func (f *BufferFormat) Get(attr AttributeType) *BufferAttribute
type Texture ¶
type Texture struct { Name string Info TextureInfo }
func (*Texture) Coord ¶
func (tex *Texture) Coord(x, y float32) TextureCoord
type TextureCoord ¶
func (TextureCoord) Lerp ¶
func (from TextureCoord) Lerp(to TextureCoord, delta float32) TextureCoord
func (TextureCoord) UV ¶
func (tc TextureCoord) UV() (u, v float32)
type TextureInfo ¶
func (TextureInfo) IsDefined ¶
func (info TextureInfo) IsDefined() bool
func (*TextureInfo) SetDimensions ¶
func (td *TextureInfo) SetDimensions(width, height int)
Click to show internal directories.
Click to hide internal directories.