mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-24 16:34:24 +00:00
gl_rasterizer: Reset normal map flag each draw (#6636)
* Fixes normal maps leaking draws
This commit is contained in:
parent
eb118b2a4c
commit
6b8a06e7b4
1 changed files with 2 additions and 6 deletions
|
@ -487,6 +487,7 @@ bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) {
|
||||||
}
|
}
|
||||||
|
|
||||||
res_cache.InvalidateFramebuffer(framebuffer);
|
res_cache.InvalidateFramebuffer(framebuffer);
|
||||||
|
use_custom_normal = false;
|
||||||
|
|
||||||
return succeeded;
|
return succeeded;
|
||||||
}
|
}
|
||||||
|
@ -581,7 +582,7 @@ void RasterizerOpenGL::BindTextureCube(const Pica::TexturingRegs::FullTextureCon
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerOpenGL::BindMaterial(u32 texture_index, Surface& surface) {
|
void RasterizerOpenGL::BindMaterial(u32 texture_index, Surface& surface) {
|
||||||
if (!surface.IsCustom() || texture_index != 0) {
|
if (!surface.IsCustom()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,11 +600,6 @@ void RasterizerOpenGL::BindMaterial(u32 texture_index, Surface& surface) {
|
||||||
}
|
}
|
||||||
bind_texture(TextureUnits::TextureNormalMap, surface.Handle(2), sampler);
|
bind_texture(TextureUnits::TextureNormalMap, surface.Handle(2), sampler);
|
||||||
use_custom_normal = true;
|
use_custom_normal = true;
|
||||||
} else {
|
|
||||||
if (use_custom_normal) {
|
|
||||||
bind_texture(TextureUnits::TextureNormalMap, 0, 0);
|
|
||||||
}
|
|
||||||
use_custom_normal = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue