Documentations - Shader Tool

The Shader Tool

Note: The Shader Tool is currently under development and not yet finished

The Shader Tool is a dotnet tool written in C#. This is mostly similar to a unix pipeline tool, unlike the previous tools. Commands can be piped into it and the minimal output or the return codes can be used for tool chaining. It has a command interface for starting without parameters. There is no GUI available for the tool, but this will change in the future.


Every command can have the --dir command option, which sets the CWD of the according command. The value of the dir option can either be a path to a valid folder or "tool", which sets the CWD to the according folder in case you start it from the IDE. It will take the normal CWD in case the option is not present.

Pipe commands

Used to manage shader pipelines

pipe list

Lists all created pipes.

pipe create <name> <shader> [moreshader...]

Creates a new Shader pipe with the given name and shader.

pipe show <name>

Shows details to the given pipe.

pipe make

Generates the C++ code for all created pipes.

pipe update <name>

Updates the PipelineInputAttributes.

pipe delete <name>

Deltetes the given pipeline.

Shader commands

Used to manage shader compiling

shader make

Compiles shader and adds them to the shader data source/header files.

Texture commands

Used to manage textures

texture add <path>

Adds a texture and copies it to the resource folder

texture rm <textureName>
texture remove <textureName>

Removes a texture from the resource folder

texture list

Lists all textures and the total count

Font commands

Used to manage fonts

font add <path>

Adds a font and copies it to the resource folder

font rm <fontName>
font remove <fontName>

Removes a font from the resource folder

font list

Lists all fonts

Material commands

Used to manage materials, with a maximum of 256 materials

material add <materialName> [texture name] [color (as hex number)]

Adds a material, can be supplied with the materials texture name and it's color

material rm <materialName>
material remove <materialName>

Removes a material

material settex <materialName> <textureName>
material settexture <materialName> <textureName>

Adds a texture to a material

material setcolor <materialName> <hexColor>

Adds a color to a material

material list

Lists all materials and the total count

Actor commands

Used to manage actors

actor add <actorName> <materialName>

Adds a actor

actor rm <actorName>
actor remove < actorName>

Removes a actor

actor list

Lists all actors and the total count

actor layer <actorName> <layerid>

Sets the layer in which the actor will be rendered in

actor vertex <actorName> <vertices...>

Sets the vertices to be associated by this actor

actor index <actorName> <indices...>

Sets the indicies to be rendered by this actor

actor tranform <actorName> <matrix 4>

Sets the local transform of the actor

Map commands

Used to manage map

map add <mapName> [actorNames, ...]

Adds a map to the resource processing and generates the according json file

map rm <mapName>
map remove <mapName>

Removes a map from the resource processing and deletes its according json file

map list

Lists all maps added with the add command in the current location

map addactor <mapName> <actorName> [moreActorNames, ...]

This adds an actor to the maps json

map make <mapName>

This creates a resource file from the given map name (See TGR docs)

map addfont <mapName> <fontName> <fontSize> [moreActorNames, ...]

This adds a font with a given size to the maps json

map rmactor <mapName> <actorName> [moreActorNames, ... ]
map removeactor <mapName> <actorName> [moreActorNames, ... ]

This removes an actor from the maps json

map rmfont <mapName> <fontName> [moreActorNames, ... ]
map removefont <mapName> <fontName> [moreActorNames, ... ]

This removes a font from the maps json