sprite

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 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 added in v1.3.1

func Detail(smp raycaster.RenderSample) 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 added in v1.3.1

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 GetNormal

func GetNormal(s *ShaderInfo) colour.RGB

func GetOcclusion

func GetOcclusion(s *ShaderInfo) colour.RGB

func GetShadowing

func GetShadowing(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 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
	ModalIndex     byte
	DitheredIndex  byte
	IsMaskColour   bool
	IsAnimated     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