|
gramods
|
Shader code for mixing textures. More...
#include <MixingShaders.hh>
Static Public Member Functions | |
| static bool | checkMixTypeValid (const std::string &mix_type, const std::string &tag) |
| Checks if the specified mix_type is valid and returns true if it is. | |
| static bool | checkCount (const std::string &mix_type, size_t count, const std::string &tag, const std::string &type) |
| Checks if the specified count of input textures is valid for the specified mix_type and returns true if it is. | |
| static std::string | getFragmentCode (const std::string &mix_type, const std::vector< std::string > &tex_swizz) |
| Returns fragment shader code for the specified mix_type. | |
Shader code for mixing textures.
This does nothing by itself but is instead used by MixingTexture and MixingView. See the documentation for those for details.
Valid mix types are
|
static |
Checks if the specified count of input textures is valid for the specified mix_type and returns true if it is.
If it is not valid, then it logs a message with the specified tag before returning false if they are too few or true if they are too many.
|
static |
Checks if the specified mix_type is valid and returns true if it is.
If it is not valid, then it logs a warning message with the specified tag before returning false.
|
static |
Returns fragment shader code for the specified mix_type.
| mix_type | The type of mixing, which must be one of the valid strings. Check with checkMixTypeValid, which also prints the list of failure. |
| tex_swizz | The correct swizzle code (e.g. rrr, rgb or bgr) for the incoming textures. This must be of size eight, so fill up with valid swizzles. |