Documentation ¶
Index ¶
- Constants
- Variables
- func Compile(assets fs.Filesystem, path string, stage ShaderStage) ([]byte, error)
- func LoadOrCompile(assets fs.Filesystem, path string, stage ShaderStage) ([]byte, error)
- func LoadSource(assets fs.Filesystem, path string, includePaths []string) ([]byte, error)
- func Ref(name string) *ref
- type Bindings
- type Details
- type Input
- type InputDetails
- type Inputs
- type Module
- type Shader
- type ShaderStage
Constants ¶
View Source
const ( StageAll = ShaderStage(core1_0.StageAll) StageVertex = ShaderStage(core1_0.StageVertex) StageFragment = ShaderStage(core1_0.StageFragment) StageCompute = ShaderStage(core1_0.StageCompute) )
Variables ¶
View Source
var ErrCompileFailed = errors.New("shader compilation error")
Functions ¶
func Compile ¶
func Compile(assets fs.Filesystem, path string, stage ShaderStage) ([]byte, error)
func LoadOrCompile ¶
func LoadOrCompile(assets fs.Filesystem, path string, stage ShaderStage) ([]byte, error)
func LoadSource ¶
Types ¶
type Details ¶
type Details struct { Inputs map[string]InputDetails Bindings map[string]int Textures []texture.Slot }
func ReadDetails ¶
func ReadDetails(assets fs.Filesystem, path string) (*Details, error)
func (*Details) ParseInputs ¶
type InputDetails ¶
type Module ¶
type Module interface { device.Resource[core1_0.ShaderModule] Entrypoint() string Stage() ShaderStage }
func NewModule ¶
func NewModule(device *device.Device, assets fs.Filesystem, path string, stage ShaderStage) Module
type ShaderStage ¶
type ShaderStage core1_0.ShaderStageFlags
func (ShaderStage) String ¶
func (s ShaderStage) String() string
Click to show internal directories.
Click to hide internal directories.