Table Of Contents

Previous topic

25.11. dae2json

Next topic

25.19. deploygame

This Page

25.18. cgfx2json

25.18.1. Usage


cgfx2json [options]

Converts a CgFX file into a JSON file.

Shader parameter semantics are ignored, parameters will be matched at runtime by the variable name.

It is recommended that the CgFX file compiles program code either to GLSL profiles or to latest, the later is required if assembly programs are requested.

For more information about the CgFX file format please read the NVidia tutorial.

For more information about JSON please visit

25.18.2. Options


Show version number and exit.

--help, -h

Show help message and exit.

--verbose, -v

Verbose output.

--asm, -a

Generate assembly programs instead of GLSL shaders.

--json_indent=SIZE, -j SIZE

JSON output pretty printing indent size, defaults to 0.

--input=INPUT, -i INPUT

Input file to process.

--output=OUTPUT, -o OUTPUT

Output file to process.


Output dependencies.


Dependencies output to FILE.

In order to convert a CgFX file to a JSON file you must provide both the input and the output.

25.18.3. Example

"tools/bin/*PLATFORM*/cgfx2json" -v -j 2 -i assets/shaders/standard.cgfx -o apps/sampleapp/shaders/standard.cgfx.json