GLES: Use linear for high-res FBO tex copies.
This commit is contained in:
parent
e56ae322fd
commit
38161f3c69
3 changed files with 6 additions and 3 deletions
|
@ -494,7 +494,7 @@ void FramebufferManagerGLES::BlitFramebufferDepth(VirtualFramebuffer *src, Virtu
|
|||
|
||||
void FramebufferManagerGLES::BindFramebufferAsColorTexture(int stage, VirtualFramebuffer *framebuffer, int flags) {
|
||||
if (!framebuffer->fbo || !useBufferedRendering_) {
|
||||
render_->BindTexture(0, nullptr);
|
||||
render_->BindTexture(stage, nullptr);
|
||||
gstate_c.skipDrawReason |= SKIPDRAW_BAD_FB_TEXTURE;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -319,6 +319,9 @@ void DrawEngineGLES::ApplyDrawStateLate(bool setStencil, int stencilValue) {
|
|||
// Note that this is positions, not UVs, that we need the copy from.
|
||||
framebufferManager_->BindFramebufferAsColorTexture(1, framebufferManager_->GetCurrentRenderVFB(), BINDFBCOLOR_MAY_COPY);
|
||||
framebufferManager_->RebindFramebuffer();
|
||||
GLRenderManager *renderManager = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
// If we are rendering at a higher resolution, linear is probably best for the dest color.
|
||||
renderManager->SetTextureSampler(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, GL_LINEAR, GL_LINEAR, 0.0f);
|
||||
fboTexBound_ = true;
|
||||
fboTexNeedBind_ = false;
|
||||
}
|
||||
|
|
|
@ -1056,8 +1056,8 @@ void GLQueueRunner::fbo_ext_create(const GLRInitStep &step) {
|
|||
fbo->color_texture.target = GL_TEXTURE_2D;
|
||||
fbo->color_texture.wrapS = GL_CLAMP_TO_EDGE;
|
||||
fbo->color_texture.wrapT = GL_CLAMP_TO_EDGE;
|
||||
fbo->color_texture.magFilter = step.texture_image.linearFilter ? GL_LINEAR : GL_NEAREST;
|
||||
fbo->color_texture.minFilter = step.texture_image.linearFilter ? GL_LINEAR : GL_NEAREST;
|
||||
fbo->color_texture.magFilter = GL_LINEAR;
|
||||
fbo->color_texture.minFilter = GL_LINEAR;
|
||||
fbo->color_texture.maxLod = 0.0f;
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, fbo->color_texture.wrapS);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, fbo->color_texture.wrapT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue