#include <shader.h>
Inheritance diagram for IShaderSource:Public Member Functions | |
| IShaderSource ()=default | |
| virtual | ~IShaderSource ()=default |
| virtual const ShaderInfo & | getShaderInfo (u32 id)=0 |
| returns information about an existing shader | |
| virtual u32 | getShader (const std::string &name, const ShaderConstants &input_const, video::E_MATERIAL_TYPE base_mat, IShaderUniformSetterRC *setter_cb=nullptr)=0 |
| Generates or gets a shader. | |
| u32 | getShader (const std::string &name, MaterialType material_type, NodeDrawType drawtype=NDT_NORMAL, bool array_texture=false) |
| Helper: Generates or gets a shader suitable for nodes and entities. | |
| u32 | getShaderRaw (const std::string &name, bool blendAlpha=false) |
| Helper: Generates or gets a shader for common, general use. | |
| virtual bool | supportsSampler2DArray () const =0 |
| Returns true if 'sampler2DArray' is supported in GLSL. | |
|
default |
|
virtualdefault |
|
pure virtual |
Generates or gets a shader.
Note that the input constants are not for passing the entire world into the shader. Use IShaderConstantSetter to handle user settings.
| name | name of the shader (directory on disk) |
| input_const | primary key constants for this shader |
| base_mat | base material to use |
| setter_cb | additional uniform setter to use |
base_material only controls alpha behavior Implemented in ShaderSource.
Referenced by GenericCAO::addToScene(), getAdHocNodeShader(), getShaderRaw(), WieldMeshSceneNode::setItem(), and NodeVisuals::updateTextures().
Here is the caller graph for this function:| u32 IShaderSource::getShader | ( | const std::string & | name, |
| MaterialType | material_type, | ||
| NodeDrawType | drawtype = NDT_NORMAL, | ||
| bool | array_texture = false ) |
Helper: Generates or gets a shader suitable for nodes and entities.
|
pure virtual |
returns information about an existing shader
Use this to get the material ID to plug into video::SMaterial.
Implemented in ShaderSource.
Referenced by Clouds::Clouds(), Hud::Hud(), MapBlockMesh::MapBlockMesh(), Sky::Sky(), GenericCAO::addToScene(), Minimap::drawMinimap(), getAdHocNodeShader(), PostProcessingStep::run(), and WieldMeshSceneNode::setItem().
Here is the caller graph for this function:
|
inline |
Helper: Generates or gets a shader for common, general use.
| name | name of the shader |
| blendAlpha | enable alpha blending for this material? |
References getShader().
Referenced by Clouds::Clouds(), Hud::Hud(), Sky::Sky(), and Minimap::drawMinimap().
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
Returns true if 'sampler2DArray' is supported in GLSL.
Implemented in ShaderSource.
Referenced by getArrayTextureMax().
Here is the caller graph for this function: