Fixed aliasing issue with render to texture
This commit is contained in:
@@ -730,10 +730,10 @@ public:
|
||||
assignSamplerNames(0, "colorMapG", ST_NEAREST_FILTERED);
|
||||
} // MLAAColorEdgeDetectionSHader
|
||||
// ------------------------------------------------------------------------
|
||||
void render(const core::vector2df &pixel_size)
|
||||
void render(const core::vector2df &pixel_size, GLuint rtt_mlaa_colors)
|
||||
{
|
||||
use();
|
||||
setTextureUnits(irr_driver->getRenderTargetTexture(RTT_MLAA_COLORS));
|
||||
setTextureUnits(rtt_mlaa_colors);
|
||||
drawFullScreenEffect(pixel_size);
|
||||
} // render
|
||||
}; // MLAAColorEdgeDetectionSHader
|
||||
@@ -1403,7 +1403,7 @@ void PostProcessing::applyMLAA(const FrameBuffer& mlaa_tmp_framebuffer,
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
|
||||
// Pass 1: color edge detection
|
||||
MLAAColorEdgeDetectionSHader::getInstance()->render(PIXEL_SIZE);
|
||||
MLAAColorEdgeDetectionSHader::getInstance()->render(PIXEL_SIZE, mlaa_colors_framebuffer.getRTT()[0]);
|
||||
|
||||
glStencilFunc(GL_EQUAL, 1, ~0);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
|
||||
|
||||
@@ -428,8 +428,6 @@ public:
|
||||
std::vector< std::vector<float> > buildHeightMap();
|
||||
void drawMiniMap(const core::rect<s32>& dest_rect) const;
|
||||
// ------------------------------------------------------------------------
|
||||
const core::dimension2du& getMiniMapSize() const { return m_mini_map_size; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns true if this track has an arena mode. */
|
||||
bool isArena() const { return m_is_arena; }
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user