Disable texture filtering when drawing color into depth

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

No files matched your search

+4
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;
+1 -1
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;
}
}