Respackopts/docs/old/canvas.md
2021-08-30 14:38:03 +02:00

932 B

Canvas

To use respackopts in your shader, you can #include respackopts:config_supplier This will import sanitized entries for all packs. You may access them as <id>_<entry> or <id>_<category>_<entry> Entries will be expressed as follows:

Type Type in shader
Boolean Will either be #defined or not, use #ifdef
Numeric Will be defined as a number you can use directly
Enum First, a number entry will be #defined. You may check if a specific value is selected via <id>_<entry>_<value> which will be handled like booleans

If respackopts is not present, the #include will not break the code, though you may want to define default values yourself. You can check whether the config supplier is properly imported through #ifdef respackopts_loaded

V1 enums

In respackopts v1 shaders, enums values are expressed by their ints and need to be compared to the value of the main entry.