![]() |
RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
As described in Effect lifecycle in RAMSES, effects need to be preprocessed by RAMSES before passing them to an offline shader compiler which in turn creates binary shaders. In short, the tool generates two things:
The shader source is stored separately for the vertex and fragment shaders, so that they can be passed directly to an offline shader compiler.
With full named parameters:
With short named parameters:
–in-vertex-shader/-iv: input file containing the vertex shader to convert
–in-fragment-shader/-if: input file containing the fragment shader to convert
–in-config/-ic: input config file which contains the definition of Uniform Semantics, Attribute Semantics and Compiler Defines (see below)
–out-vertex-shader/-ov: path to file where the generated ramses vertex shader will be stored
–out-fragment-shader/-of: path to file where the generated ramses fragment shader will be stored
–out-effect-id/-oe: path to file where the ramses effect ID will be stored
–out-effect-id-type/-ot: which type (client or renderer) of effectId to use when writing the effectId; see Effect lifecycle in RAMSES for more info
Besides the vertex and fragment shaders, the user also has to provide a configuration which contains additional information such as definition of Attribute Semantics, Uniform Semantics and Compiler Defines. The config file has a fixed and simple line-based format. Below is a complete example of a config file which has all possible types of parameters which can be passed to RAMSES. It is possible to omit properties which are not needed.
The configuration properties are exactly the same as those provided to ramses::EffectDescription when creating effects with the RAMSES API. See the documentation of ramses::EffectDescription for more details.
To define a Uniform Semantic, start a line with keyword UNIFORM_SEMANTIC. The second token is the inputName for the semantic, and the third token is the semantic name.
To define an attribute semantic, start a line with keyWord ATTRIBUTE_SEMANTIC. The second token is the inputName for the semantic, and the third token is the semantic name.
To define a compiler defintion, the first Token is the keyword DEFINE, and the second token is the definition statement.