28 bool DeferredLightingShaderPBRTreeImplementation::isSupported(
Renderer* renderer) {
37 return "defer_pbr-tree";
47 "shader/" + shaderVersion +
"/lighting/pbr",
48 "render_vertexshader.vert",
50 "#define LIGHT_COUNT " + to_string(
Engine::LIGHTS_MAX) +
"\n#define USE_PUNCTUAL\n#define MATERIAL_METALLICROUGHNESS\n" +
51 "#define HAVE_TREE\n#define HAVE_DEPTH_FOG\n#define USE_IBL\n",
52 FileSystem::getInstance()->getContentAsString(
53 "shader/" + shaderVersion +
"/functions",
54 "create_rotation_matrix.inc.glsl"
57 FileSystem::getInstance()->getContentAsString(
58 "shader/" + shaderVersion +
"/functions",
59 "create_translation_matrix.inc.glsl"
62 FileSystem::getInstance()->getContentAsString(
63 "shader/" + shaderVersion +
"/functions",
64 "create_tree_transform_matrix.inc.glsl"
72 "shader/" + shaderVersion +
"/lighting/pbr",
73 "defer_fragmentshader.frag",
74 "#define LIGHT_COUNT " + to_string(
Engine::LIGHTS_MAX) +
"\n#define USE_PUNCTUAL\n#define MATERIAL_METALLICROUGHNESS\n#define USE_IBL\n",
75 FileSystem::getInstance()->getContentAsString(
76 "shader/" + shaderVersion +
"/functions/pbr",
77 "tonemapping.inc.glsl"
80 FileSystem::getInstance()->getContentAsString(
81 "shader/" + shaderVersion +
"/functions/pbr",
85 FileSystem::getInstance()->getContentAsString(
86 "shader/" + shaderVersion +
"/functions/pbr",
90 FileSystem::getInstance()->getContentAsString(
91 "shader/" + shaderVersion +
"/functions/pbr",
92 "pbr_lighting.inc.glsl"
TDME2 engine entity shader parameters.
Shader parameter model class.
Lighting shader implementation.
virtual void initialize() override
Initialize renderer.
DeferredLightingShaderPBRTreeImplementation(Renderer *renderer)
Public constructor.
virtual void registerShader() override
Register shader.
virtual const string getId() override
virtual void useProgram(Engine *engine, int contextIdx) override
Use lighting program.
virtual void updateShaderParameters(Renderer *renderer, int contextIdx) override
Update shader parameters.
Lighting shader implementation.
virtual void initialize() override
Initialize renderer.
virtual void useProgram(Engine *engine, int contextIdx) override
Use lighting program.
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.
const EntityShaderParameters & getShaderParameters(int contextIdx)
Get shader parameters.
virtual void attachShaderToProgram(int32_t programId, int32_t shaderId)=0
Attaches a shader to a program.
virtual int32_t getProgramUniformLocation(int32_t programId, const string &name)=0
Returns location of given uniform variable.
virtual bool isDeferredShadingAvailable()=0
virtual const string getShaderVersion()=0
virtual void setProgramUniformFloat(int contextIdx, int32_t uniformId, float value)=0
Set up a float uniform value.
File system singleton class.