sprite

package
v0.0.0-...-6e0df7b Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply32bppSprite

func Apply32bppSprite(img *image.RGBA, bounds image.Rectangle, loc image.Point, info ShaderOutput, getProperty func(*ShaderInfo) colour.RGB)

func ApplyIndexedSprite

func ApplyIndexedSprite(img *image.Paletted, bounds image.Rectangle, loc image.Point, info ShaderOutput, getProperty func(*ShaderInfo) byte)

func ApplyUniformSprite

func ApplyUniformSprite(img *image.RGBA, bounds image.Rectangle, loc image.Point)

func AveragedNormal

func AveragedNormal(smp raycaster.RenderSample) colour.RGB

func Colour

func Colour(smp raycaster.RenderSample, d *manifest.Definition, resolveSpecialColours bool, influence float64) colour.RGB

func Depth

func Depth(smp raycaster.RenderSample) colour.RGB

func Detail

func Detail(smp raycaster.RenderSample) colour.RGB

func FloatValue

func FloatValue(value float64) colour.RGB

func GetAveragedNormal

func GetAveragedNormal(s *ShaderInfo) colour.RGB

func GetColour

func GetColour(s *ShaderInfo) colour.RGB

func GetDepth

func GetDepth(s *ShaderInfo) colour.RGB

func GetDetail

func GetDetail(s *ShaderInfo) colour.RGB

func GetIndex

func GetIndex(s *ShaderInfo) byte

func GetLighting

func GetLighting(s *ShaderInfo) colour.RGB

func GetMaskIndex

func GetMaskIndex(s *ShaderInfo) byte

func GetMidpointDistance

func GetMidpointDistance(s *ShaderInfo) colour.RGB

func GetNormal

func GetNormal(s *ShaderInfo) colour.RGB

func GetOcclusion

func GetOcclusion(s *ShaderInfo) colour.RGB

func GetRegion

func GetRegion(s *ShaderInfo) colour.RGB

func GetShadowing

func GetShadowing(s *ShaderInfo) colour.RGB

func GetTransparency

func GetTransparency(s *ShaderInfo) colour.RGB

func Lighting

func Lighting(smp raycaster.RenderSample) colour.RGB

func Normal

func Normal(smp raycaster.RenderSample) colour.RGB

func Occlusion

func Occlusion(smp raycaster.RenderSample) colour.RGB

func Shadow

func Shadow(smp raycaster.RenderSample) colour.RGB

Types

type RegionInfo

type RegionInfo struct {
	MinDistanceFromMidpoint float64
	MaxDistanceFromMidpoint float64
	MinIndex                byte
	MaxIndex                byte
	DistanceHistogram       []int
	IndexHistogram          []int
	FilledHistogramBuckets  int
	RangeLength             float64
	Size                    int
	SizeInRange             int
	Range                   *colour.PaletteRange
	RequiresExpansion       bool
}

type ShaderInfo

type ShaderInfo struct {
	Colour               colour.RGB
	SpecialColour        colour.RGB
	Alpha                float64
	Specialness          float64
	Normal               colour.RGB
	AveragedNormal       colour.RGB
	Depth                colour.RGB
	Occlusion            colour.RGB
	Lighting             colour.RGB
	Shadowing            colour.RGB
	Detail               colour.RGB
	Transparency         colour.RGB
	Region               int
	ModalIndex           byte
	DitheredIndex        byte
	IsMaskColour         bool
	IsAnimated           bool
	Midpoint             float64
	DistanceFromMidpoint float64
	IsBottom             bool
	IsLeft               bool
}

type ShaderOutput

type ShaderOutput [][]ShaderInfo

func GetShaderOutput

func GetShaderOutput(renderOutput raycaster.RenderOutput, spr manifest.Sprite, def *manifest.Definition, width int, height int) (output ShaderOutput)

Jump to

Keyboard shortcuts

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