26 bool PostProcessingShaderSSAOMapImplementation::isSupported(
Renderer* renderer) {
41 "shader/" + shaderVersion +
"/postprocessing",
42 "ssao_map_fragmentshader.frag"
49 "shader/" + shaderVersion +
"/postprocessing",
50 "ssao_map_vertexshader.vert"
129 randomTexture = TextureReader::read(pathName +
"/resources/engine/textures",
"random.png");
static Engine * getInstance()
Returns engine instance.
static TextureManager * getTextureManager()
const ShaderParameter getShaderParameter(const string &shaderId, const string ¶meterName)
Returns shader parameter for given shader id and parameter name, if the value does not exist,...
static void registerShader(ShaderType type, const string &shaderId, const vector< Shader::ParameterDefaults > ¶meterDefaults={}, bool internal=false)
Register shader.
float getFloatValue() const
float getIntegerValue() const
void setUseMipMap(bool useMipMap)
Set if to use mip map.
void removeTexture(Texture *texture)
Removes a texture from manager.
TextureManager_TextureManaged * addTexture(const string &id, bool &created)
Adds a texture to manager.
Post processing shader base implementation.
virtual void initialize() override
Initialize post processing shader.
virtual void useProgram(int contextIdx) override
Use program.
virtual void setTextureUnit(int contextIdx, int32_t textureUnit)=0
Sets up texture unit.
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 void setProgramUniformInteger(int contextIdx, int32_t uniformId, int32_t value)=0
Set up a integer uniform value.
virtual void bindTexture(int contextIdx, int32_t textureId)=0
Binds a texture with given id or unbinds when using ID_NONE.
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.
int32_t CONTEXTINDEX_DEFAULT
virtual void setProgramUniformFloatVec3(int contextIdx, int32_t uniformId, const array< float, 3 > &data)=0
Set up a float vec3 uniform value.
virtual const string getShaderVersion()=0
virtual void setProgramUniformFloat(int contextIdx, int32_t uniformId, float value)=0
Set up a float uniform value.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
virtual void releaseReference()
Releases a reference, thus decrementing the counter and delete it if reference counter is zero.