Found another instance of PassThrough Shader usage.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15049 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -731,8 +731,7 @@ void PostProcessing::renderGaussian6Blur(video::ITexture *in, video::ITexture *t
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
static
|
||||
void renderPassThrough(ITexture *tex)
|
||||
void PostProcessing::renderPassThrough(ITexture *tex)
|
||||
{
|
||||
if (!PassThroughShader::Program)
|
||||
PassThroughShader::init();
|
||||
|
||||
@@ -84,6 +84,9 @@ public:
|
||||
/** Blur the in texture */
|
||||
void renderGaussian6Blur(video::ITexture *in, video::ITexture *temprtt, float inv_width, float inv_height);
|
||||
|
||||
/** Render tex. Used for blit/texture resize */
|
||||
void renderPassThrough(video::ITexture *tex);
|
||||
|
||||
/** Render the post-processed scene */
|
||||
void render();
|
||||
|
||||
|
||||
@@ -639,14 +639,12 @@ void IrrDriver::renderGlow(video::SOverrideMaterial &overridemat,
|
||||
minimat.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
|
||||
|
||||
// To half
|
||||
minimat.setTexture(0, m_rtts->getRTT(RTT_TMP1));
|
||||
m_video_driver->setRenderTarget(m_rtts->getRTT(RTT_HALF1), false, false);
|
||||
m_post_processing->drawQuad(cam, minimat);
|
||||
m_post_processing->renderPassThrough(m_rtts->getRTT(RTT_TMP1));
|
||||
|
||||
// To quarter
|
||||
minimat.setTexture(0, m_rtts->getRTT(RTT_HALF1));
|
||||
m_video_driver->setRenderTarget(m_rtts->getRTT(RTT_QUARTER1), false, false);
|
||||
m_post_processing->drawQuad(cam, minimat);
|
||||
m_post_processing->renderPassThrough(m_rtts->getRTT(RTT_HALF1));
|
||||
|
||||
// Blur it
|
||||
m_post_processing->renderGaussian6Blur(m_rtts->getRTT(RTT_QUARTER1), m_rtts->getRTT(RTT_QUARTER2), 4.f / UserConfigParams::m_width, 4.f / UserConfigParams::m_height);
|
||||
|
||||
Reference in New Issue
Block a user