package
0.2.0
Repository: https://github.com/g3n/engine.git
Documentation: pkg.go.dev

# README

This directory contains GLSL shaders used by the engine

If any shader in this directory or include 'chunk' in the "include" subdirectory is modified or a new shader or chunk is added or removed it is necessary to execute:

go generate

in this directory to update the "sources.go" file. It will invoke the "g3nshaders" command which will read the shaders and include files and generate the "sources.go" file.

To install "g3nshaders" change to the "tools/g3nshaders" directory from the engine "root" and execute: "go install".

# Functions

AddInclude adds a chunk of shader code to the default shaders registry which can be included in a shader using the "#include <name>" directive.
AddProgram adds a shader program to the default registry of programs.
AddShader add a shader to default shaders registry.
GetProgramInfo returns ProgramInfo struct for the specified program name in the default shaders registry.
Includes returns list with the names of all include chunks currently in the default shaders registry.
IncludeSource returns the source code of the specified shader include chunk.
Programs returns list with the names of all programs currently in the default shaders registry.
Shaders returns list with the names of all shaders currently in the default shaders registry.
ShaderSource returns the source code of the specified shader in the default shaders registry.

# Structs

ProgramInfo contains information for a registered shader program.