Geometry Compiler (geometryc)¶
Converts Wavefront .obj mesh file to format optimal for using with bgfx.
Shader Compiler (shaderc)¶
bgfx cross-platform shader language is based on GLSL syntax. It’s uses ANSI C preprocessor to transform GLSL like language syntax into HLSL. This technique has certain drawbacks, but overall it’s simple and allows quick authoring of cross-platform shaders.
Some differences between bgfx’s shaderc flavor of GLSL and regular GLSL:
bool/intuniforms, all uniforms must be
Attributes and varyings can be accessed only from
SAMPLER2D/3D/CUBE/etc.macros instead of
mul(x, y)when multiplying vectors and matrices.
varying.def.scto define input/output semantic and precission instead of using
$input/$outputtokens must appear at the begining of shader.
For more info see shader helper macros.
Shaders must be compiled for all renderers by using shaderc tool. Makefile to simplify building shaders is provided in examples. D3D9 and D3D11 shaders can be only compiled on Windows.
Texture Compiler (texturec)¶
Convert PNG, TGA, DDS, KTX, PVR texture into bgfx supported texture formats.
Texture Viewer (texturev)¶