shader

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT, MIT, Unlicense, + 2 more Imports: 0 Imported by: ? 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

GPU programs for the Gio project

This repository contains source code for the Gio project. It also contains the generators and derived versions for use with the GPU APIs supported by Gio.

Generating CPU fallbacks

The piet/gencpu.sh script updates the piet-gpu binaries:

$ cd piet
$ ./gencpu.sh

Development shell with Nix

Use Nix flakes to set up a development shell with the tool available for running go generate:

$ nix develop
$ DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer go generate ./...

Issues and contributions

See the Gio contribution guide.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferBinding

type BufferBinding struct {
	Name    string
	Binding int
}

type DataType

type DataType uint8
const (
	DataTypeFloat DataType = iota
	DataTypeInt
	DataTypeShort
)

type ImageBinding

type ImageBinding struct {
	Name    string
	Binding int
}

type InputLocation

type InputLocation struct {
	// For GLSL.
	Name     string
	Location int
	// For HLSL.
	Semantic      string
	SemanticIndex int

	Type DataType
	Size int
}

type Sources

type Sources struct {
	Name           string
	SPIRV          string
	GLSL100ES      string
	GLSL150        string
	DXBC           string
	MetalLib       string
	Uniforms       UniformsReflection
	Inputs         []InputLocation
	Textures       []TextureBinding
	StorageBuffers []BufferBinding
	Images         []ImageBinding
	WorkgroupSize  [3]int
}

type TextureBinding

type TextureBinding struct {
	Name    string
	Binding int
}

type UniformLocation

type UniformLocation struct {
	Name   string
	Type   DataType
	Size   int
	Offset int
}

type UniformsReflection

type UniformsReflection struct {
	Locations []UniformLocation
	Size      int
}

Directories

Path Synopsis
cmd
convertshaders command
Package giokit holds the shaders giokit adds to Gio's renderer for paint.ShaderOp and transformed paint layers.
Package giokit holds the shaders giokit adds to Gio's renderer for paint.ShaderOp and transformed paint layers.

Jump to

Keyboard shortcuts

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