Vp::BoxBlurShader
Two pass box blur with alpha support.
#include "Viewport/shader/BoxBlurShader.h"
Inherits from Vp::Shader
Public Functions
Name | |
---|---|
BoxBlurShader(GLuint id) | |
virtual void | init(bool initSuperclass) override |
virtual void | setUniforms() override<br>Set uniforms before rendering. |
Public Attributes
Name | |
---|---|
int | m_kernelSize <br>Size of the blur kernel in pixels. |
glm::vec2 | m_resolution <br>Resolution of the current buffer in pixels. |
GLuint | m_sourceTextureId |
bool | m_vertical <br>Vertical or horizontal blur pass. |
Protected Attributes
Name | |
---|---|
GLint | m_kernelSizeId |
GLint | m_resolutionId |
GLint | m_sourceSampler |
GLint | m_verticalId |
Additional inherited members
Public Functions inherited from Vp::Shader
Name | |
---|---|
Shader(GLuint id) | |
virtual | ~Shader() =default |
void | bindTexture2D(GLuint textureUnit, GLuint textureID, GLint samplerLocation) |
void | bindTexture2DMS(GLuint textureUnit, GLuint textureID, GLint samplerLocation) |
bool | hasUniform(GLint location) |
virtual void | setUniformsPerMeshPart(Core::Mesh::MeshPart & meshPart)<br>Set uniforms before rendering individual mesh parts. |
bool | supportsWboit() |
virtual void | use() const |
Public Attributes inherited from Vp::Shader
Name | |
---|---|
GLuint | m_id |
bool | m_wboit <br>Whether to use weighted blended transparency for output if supported. |
int | m_wboitFunc |
Protected Attributes inherited from Vp::Shader
Name | |
---|---|
GLint | m_wboitFlagId <br>Uniform id of the wboit enable/disable flag. |
GLint | m_wboitFuncId |
Public Functions Documentation
function BoxBlurShader
cpp
explicit BoxBlurShader(
GLuint id
)
explicit BoxBlurShader(
GLuint id
)
function init
cpp
virtual void init(
bool initSuperclass
) override
virtual void init(
bool initSuperclass
) override
Reimplements: Vp::Shader::init
function setUniforms
cpp
virtual void setUniforms() override
virtual void setUniforms() override
Set uniforms before rendering.
Reimplements: Vp::Shader::setUniforms
Public Attributes Documentation
variable m_kernelSize
cpp
int m_kernelSize {10};
int m_kernelSize {10};
Size of the blur kernel in pixels.
variable m_resolution
cpp
glm::vec2 m_resolution;
glm::vec2 m_resolution;
Resolution of the current buffer in pixels.
variable m_sourceTextureId
cpp
GLuint m_sourceTextureId {0};
GLuint m_sourceTextureId {0};
variable m_vertical
cpp
bool m_vertical {true};
bool m_vertical {true};
Vertical or horizontal blur pass.
Protected Attributes Documentation
variable m_kernelSizeId
cpp
GLint m_kernelSizeId;
GLint m_kernelSizeId;
variable m_resolutionId
cpp
GLint m_resolutionId;
GLint m_resolutionId;
variable m_sourceSampler
cpp
GLint m_sourceSampler;
GLint m_sourceSampler;
variable m_verticalId
cpp
GLint m_verticalId;
GLint m_verticalId;
Updated on 2025-01-07 at 13:40:43 +0000