28#include "Utils/CSingleton.h"
Represents a programmable shader, including uniforms, UI, resources, instancing and platform-specific...
Definition CShader.h:198
std::function< IShaderInstancing *(const char *)> OnCreateInstancingVertex
Definition CShaderManager.h:101
int getShaderIDByName(const char *name)
Get the material ID of a shader by its name.
CShader * getShaderByName(const char *name)
Get a shader instance by its name.
video::SVec4 ShaderVec4[10]
Definition CShaderManager.h:85
CShader * getShaderByID(int id)
Get a shader instance by its internal material ID.
void initMobileSGShader()
Initialize built-in shaders for mobile platforms.
bool buildShader(CShader *shader, io::IXMLReader *xmlReader, const char *source, const char *shaderFolder, bool rebuild)
Internal function to build a shader from XML, source, and folder. Handles dependency loading,...
void setCurrentMaterial(SMaterial &mat)
Set the material to be used for current rendering.
Definition CShaderManager.h:141
SMaterial * getCurrentMaterial()
Get the material currently used for rendering.
Definition CShaderManager.h:150
core::vector3df ShaderVec3[10]
Definition CShaderManager.h:81
std::map< std::string, int > m_listShaderID
Map from shader name to internal material ID.
Definition CShaderManager.h:70
IMeshBuffer * getCurrentMeshBuffer()
Get the mesh buffer currently used for rendering.
Definition CShaderManager.h:132
bool rebuildShader(CShader *shader)
Rebuild a shader by reloading its configuration from source file. Useful for hot-reloading,...
std::string getShaderFileName(const char *fileName)
Get the shader file name with the appropriate extension for the current graphics API....
CShader * getShaderByPath(const char *path)
Get a shader instance by its source path.
void initPBRForwarderShader()
Initialize built-in shaders for Physically-Based Rendering (PBR) forward pipeline.
void initBasicShader()
Initialize basic built-in shaders for basic rendering features.
u32 BoneCount
Definition CShaderManager.h:93
CShaderManager()
Constructor.
core::vector2df ShaderVec2[10]
Definition CShaderManager.h:77
f32 * BoneMatrix
Definition CShaderManager.h:89
void initShader()
Initialize all shader systems (calls basic and engine shader initializers).
int getNumShader()
Get the number of loaded shader materials.
Definition CShaderManager.h:251
SMaterial * m_currentMatRendering
Pointer to material currently being rendered.
Definition CShaderManager.h:64
IMeshBuffer * m_currentMeshBuffer
Pointer to mesh buffer currently being rendered.
Definition CShaderManager.h:61
CShader * getShader(int i)
Get a loaded shader material by index.
Definition CShaderManager.h:261
void initGUIShader()
Initialize built-in GUI shaders required for Skylicht's UI rendering.
CShader * loadShader(const char *shaderConfig)
Load a shader from an XML configuration file. If the shader is already loaded, returns the cached ins...
void initSGForwarderShader()
Initialize built-in shaders for Specular-Glossiness Forward rendering.
void initSGDeferredShader()
Initialize built-in shaders for Specular-Glossiness Deferred rendering.
std::vector< CShader * > m_listShader
List of loaded shaders.
Definition CShaderManager.h:67
void releaseAll()
Release all loaded shaders and associated resources.
void setCurrentMeshBuffer(IMeshBuffer *buffer)
Set the mesh buffer to be used for current rendering.
Definition CShaderManager.h:123
float LightmapIndex
Definition CShaderManager.h:97
void initSkylichtEngineShader()
Initialize all core engine shaders (deferred, forward, etc.).
virtual ~CShaderManager()
Destructor. Releases all loaded shaders.
Interface for shader callbacks, used to set constants in user-extended shaders.
Definition CShader.h:170
Abstract base class for GPU instancing logic in Skylicht-Engine.
Definition IShaderInstancing.h:45
Struct for holding a mesh with a single material.
Definition IMeshBuffer.h:42
Struct for holding parameters for a material renderer.
Definition SMaterial.h:255
#define DECLARE_SINGLETON(className)
Declare the standard singleton accessors for a class.
Definition CSingleton.h:36
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
vector2d< f32 > vector2df
Typedef for f32 2d vector.
Definition vector2d.h:323
IIrrXMLReader< wchar_t, IReferenceCounted > IXMLReader
An xml reader for wide characters, derived from IReferenceCounted.
Definition IXMLReader.h:19
float f32
32 bit floating point variable.
Definition irrTypes.h:104
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
Definition S3DVertex.h:301