shaders

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

meui-shaders

Canonical WGSL shaders for MeUI, compiled to every graphics backend by a build-time Go tool.

go run ./cmd/shaderc -src shaders -out generated

Targets:

Directory Backend
generated/glsl330 OpenGL 3.3 core
generated/gles300 OpenGL ES 3.0
generated/spirv Vulkan
generated/msl Metal (macOS/iOS)
generated/hlsl Direct3D HLSL (DXBC/DXIL via DXC/SDL_shadercross)
generated/dxil Direct3D 12 DXIL (naga, experimental)

The compiler uses gogpu/naga, a pure Go WGSL compiler. It is a build-time dependency; applications embed the generated artifacts.

Current pipelines:

  • tri — barycentric antialiased triangle
  • text — glyph atlas and image quads
  • blur — separable 7-tap blur
  • rect — immediate rectangle/gradient
  • shape — simple rect/circle SDF batch

The SDF/shape pipeline is still in GLSL under mobilegles; it needs the texture-binding redesign described in rendering-platforms.md.

Documentation

Overview

Package shaders exposes the generated shader artifacts to renderer modules. The canonical sources and compiler live in this module; applications embed the generated files and never depend on naga at runtime.

Index

Constants

This section is empty.

Variables

View Source
var Targets = []string{"glsl330", "gles300", "spirv", "msl", "hlsl", "dxil"}

Targets are the generated backend directories.

Functions

func Open

func Open() fs.FS

Open returns the generated tree for embedding or inspection.

func Read

func Read(target, name string) ([]byte, error)

Read returns one generated artifact, for example Read("spirv", "sdf.frag.spv").

Types

This section is empty.

Directories

Path Synopsis
cmd
shaderc command
Command shaderc compiles the canonical WGSL shaders into every backend language MeUI needs.
Command shaderc compiles the canonical WGSL shaders into every backend language MeUI needs.

Jump to

Keyboard shortcuts

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