Disable texture filtering when drawing color into depth

This commit is contained in:
Henrik Rydgård 2022-08-01 14:08:00 +02:00
parent 7b7d16d2fb
commit f73995b5db
2 changed files with 5 additions and 1 deletions

View file

@ -261,6 +261,10 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, const TexCac
}
}
if (gstate_c.renderMode == FB_MODE_COLOR_TO_DEPTH) {
forceFiltering = TEX_FILTER_FORCE_NEAREST;
}
switch (forceFiltering) {
case TEX_FILTER_AUTO:
break;

View file

@ -561,7 +561,7 @@ struct GPUStateCache {
if (mode != renderMode) {
// This mode modifies the fragment shader to write depth, the depth state to write without testing, and the blend state to write nothing to color.
// So we need to re-evaluate those states.
Dirty(DIRTY_FRAGMENTSHADER_STATE | DIRTY_BLEND_STATE | DIRTY_DEPTHSTENCIL_STATE);
Dirty(DIRTY_FRAGMENTSHADER_STATE | DIRTY_BLEND_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_TEXTURE_PARAMS);
renderMode = mode;
}
}