QuadType bind() { if(!isEnabled()) return QUAD_NONE; gPostPosterizeProgram.bind(); gPostPosterizeProgram.uniform1i("layerCount", mNumLayers); return QUAD_NORMAL; }
QuadType bind() { if(!isEnabled()) { return QUAD_NONE; } glh::matrix4f inv_proj(gGLModelView); inv_proj.mult_left(gGLProjection); inv_proj = inv_proj.inverse(); glh::matrix4f prev_proj(gGLPreviousModelView); prev_proj.mult_left(gGLProjection); LLVector2 screen_rect = LLPostProcess::getInstance()->getDimensions(); gPostMotionBlurProgram.bind(); gPostMotionBlurProgram.uniformMatrix4fv("prev_proj", 1, GL_FALSE, prev_proj.m); gPostMotionBlurProgram.uniformMatrix4fv("inv_proj", 1, GL_FALSE, inv_proj.m); gPostMotionBlurProgram.uniform2fv("screen_res", 1, screen_rect.mV); gPostMotionBlurProgram.uniform1i("blur_strength", mStrength); return QUAD_NORMAL; }