Added Gaussian blur post-process shader

Added ability to manually input values in post-process shader menu
This commit is contained in:
Shyotl
2011-02-10 04:03:22 -06:00
parent a44d633bc8
commit a579663eb9
9 changed files with 203 additions and 64 deletions

View File

@@ -124,7 +124,10 @@ public:
inline LLSD & useColorFilter() {
return (*this)["enable_color_filter"];
}
inline LLSD & useGaussBlurFilter() {
return (*this)["enable_gauss_blur"];
}
inline F32 getBrightMult() const {
return F32((*this)["brightness_multiplier"].asReal());
@@ -182,6 +185,9 @@ public:
return F32((*this)["saturation"].asReal());
}
inline LLSD & getGaussBlurPasses() {
return (*this)["gauss_blur_passes"];
}
};
bool initialized;
@@ -230,6 +236,7 @@ private:
glslUniforms bloomExtractUniforms;
glslUniforms bloomBlurUniforms;
glslUniforms colorFilterUniforms;
glslUniforms gaussBlurUniforms;
// the name of currently selected effect in mAllEffects
// invariant: tweaks == mAllEffects[mSelectedEffectName]
@@ -253,10 +260,14 @@ private:
void createColorFilterShader(void);
void applyColorFilterShader(void);
/// Gaussian blur Filter Functions
void createGaussBlurShader(void);
void applyGaussBlurShader(void);
/// OpenGL Helper Functions
void getShaderUniforms(glslUniforms & uniforms, GLhandleARB & prog);
void createTexture(LLPointer<LLImageGL>& texture, unsigned int width, unsigned int height);
void copyFrameBuffer(U32 & texture, unsigned int width, unsigned int height);
void copyFrameBuffer(LLGLuint texture, unsigned int width, unsigned int height);
void createNoiseTexture(LLPointer<LLImageGL>& texture);
bool checkError(void);
void checkShaderError(GLhandleARB shader);