shader

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shader

type Shader func(image.Image) ShaderOutput

Shader takes an initial screen state and returns a function that calculates the output for each screen cell at each time step.

type ShaderAnimation

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

ShaderAnimation is a simple system for writing OpenGL-like "shaders".

func NewShaderAnimation

func NewShaderAnimation(shader Shader) *ShaderAnimation

func (*ShaderAnimation) Init

func (s *ShaderAnimation) Init(start image.Image)

func (*ShaderAnimation) Update

func (s *ShaderAnimation) Update(delta time.Duration) image.Image

type ShaderOutput

type ShaderOutput func(
	ts time.Duration,
	row int,
	col int,
	rows int,
	cols int,
) emu.Glyph

ShaderOutput is a function that calculates the output for a single screen cell.

Jump to

Keyboard shortcuts

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