22 bool DeferredLightingShaderPBRDefaultImplementation::isSupported(
Renderer* renderer) {
31 return "defer_pbr-default";
42 "shader/" + shaderVersion +
"/lighting/pbr",
43 "render_vertexshader.vert",
44 "#define LIGHT_COUNT " + to_string(
Engine::LIGHTS_MAX) +
"\n#define USE_PUNCTUAL\n#define MATERIAL_METALLICROUGHNESS\n#define USE_IBL\n"
51 "shader/" + shaderVersion +
"/lighting/pbr",
52 "defer_fragmentshader.frag",
53 "#define LIGHT_COUNT " + to_string(
Engine::LIGHTS_MAX) +
"\n#define USE_PUNCTUAL\n#define MATERIAL_METALLICROUGHNESS\n#define USE_IBL\n",
54 FileSystem::getInstance()->getContentAsString(
55 "shader/" + shaderVersion +
"/functions/pbr",
56 "tonemapping.inc.glsl"
59 FileSystem::getInstance()->getContentAsString(
60 "shader/" + shaderVersion +
"/functions/pbr",
64 FileSystem::getInstance()->getContentAsString(
65 "shader/" + shaderVersion +
"/functions/pbr",
69 FileSystem::getInstance()->getContentAsString(
70 "shader/" + shaderVersion +
"/functions/pbr",
71 "pbr_lighting.inc.glsl"
Lighting shader implementation.
virtual void initialize() override
Initialize renderer.
DeferredLightingShaderPBRDefaultImplementation(Renderer *renderer)
Public constructor.
virtual void registerShader() override
Register shader.
virtual const string getId() override
virtual void updateShaderParameters(Renderer *renderer, int contextIdx) override
Update shader parameters.
Lighting shader implementation.
virtual void initialize() override
Initialize renderer.
virtual int32_t loadShader(int32_t type, const string &pathName, const string &fileName, const string &definitions=string(), const string &functions=string())=0
Loads a shader.
int32_t SHADER_FRAGMENT_SHADER
int32_t SHADER_VERTEX_SHADER
virtual int32_t createProgram(int type)=0
Creates a shader program.
virtual bool isPBRAvailable()=0
virtual void attachShaderToProgram(int32_t programId, int32_t shaderId)=0
Attaches a shader to a program.
virtual bool isDeferredShadingAvailable()=0
virtual const string getShaderVersion()=0
File system singleton class.