render

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZeroIntensity    = 0
	MapEdgeIntensity = 11
	FullIntensity    = 15
)
View Source
const BaseResolution = 16
View Source
const Gamma = 2.2

Variables

View Source
var SunLightDir = lm.Vec3(-0.5, 1, -0.8).Normalize()
View Source
var SunLightIntensity = 0.95 / SunLightDir.MaxComponent()

Functions

func DecodeLight

func DecodeLight(param1 uint8) float64

Types

type BlockNeighborhood

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

func (*BlockNeighborhood) FetchBlock

func (b *BlockNeighborhood) FetchBlock(w *world.World, posOffset, worldPos spatial.BlockPosition)

func (*BlockNeighborhood) GetNode

func (*BlockNeighborhood) GetParam1

func (b *BlockNeighborhood) GetParam1(pos spatial.NodePosition) uint8

func (*BlockNeighborhood) SetBlock

func (b *BlockNeighborhood) SetBlock(pos spatial.BlockPosition, block *world.MapBlock)

type NodeRasterizer

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

func NewNodeRasterizer

func NewNodeRasterizer(projection lm.Matrix3) NodeRasterizer

func (*NodeRasterizer) Render

type RenderableNode

type RenderableNode struct {
	Name        string
	Light       float64
	Param2      uint8
	HiddenFaces mesh.CubeFaces
}

type Renderer

type Renderer interface {
	RenderTile(pos TilePosition, w *world.World, game *game.Game) *raster.RenderBuffer
}

type TilePosition

type TilePosition struct {
	X, Y int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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