shaders

package
v0.0.0-...-e0e0083 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatShader

func FormatShader(key string, s *Shader) string

FormatShader formats a shader for CLI display.

Types

type Shader

type Shader struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Category    string    `json:"category"`
	GLSL        string    `json:"glsl"`
	Uniforms    []Uniform `json:"uniforms"`
	Inputs      []string  `json:"inputs"`
	Tags        []string  `json:"tags"`
}

Shader represents a GLSL shader template.

func Get

func Get(key string) *Shader

Get returns a shader by key.

type ShaderSummary

type ShaderSummary struct {
	Key         string `json:"key"`
	Name        string `json:"name"`
	Category    string `json:"category"`
	Description string `json:"description"`
}

ShaderSummary is a brief listing entry.

func List

func List(category string) []ShaderSummary

List returns all shaders, optionally filtered by category.

func Search(query string, limit int) []ShaderSummary

Search finds shaders matching a query string.

type Uniform

type Uniform struct {
	Name        string      `json:"name"`
	Type        string      `json:"type"`
	Default     interface{} `json:"default"`
	Expression  string      `json:"expression,omitempty"`
	Description string      `json:"description"`
}

Uniform describes a shader uniform parameter.

Jump to

Keyboard shortcuts

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