|
The Vish Visualization Shell 0.3
Vish
|
Base class to ease setting a VSlot as shader defines. More...
#include <ocean/Anemonia/ShaderConditionals.hpp>
Public Member Functions | |
| RenderNamespace::glsl | getShaderDefines (const RefPtr< ValuePool > &Context) const |
| GLSL code with definition directives, needs to be included early in the shader, for instance in the prefix, or as code preceding anything else in the shader function. | |
| bool | hasValidShaderDefines (const AnemoneCreatorContext &ACC) const |
| Check whether the slots defining the various definitions are modified as compared to the Render Anemone. | |
Base class to ease setting a VSlot as shader defines.
Definition of a bool in a class:
Example code in a constructor:
Also, conditionals based on floating point VSlot inputs as in
can be defined. Those require an additional setting in the FloatConditional entries with a function that turns a floating point value into a boolean, which can be done via a lambda expression as in:
| bool Wizt::ShaderConditionals::hasValidShaderDefines | ( | const AnemoneCreatorContext & | ACC | ) | const |
Check whether the slots defining the various definitions are modified as compared to the Render Anemone.
Usuaally called from within an isValidAnemone() function.
References Wizt::AnemoneCreatorContext::myAnemoneCreator.