mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 18:49:51 +01:00
GL: Allow ShaderTexClamp path on PowerVR if no projection is needed
This commit is contained in:
1 parent
e9d5eb694b
commit
dcfc37a39d
1 file changed
+4
-2
@@ -288,8 +288,10 @@ bool GenerateFragmentShader(const ShaderID &id, char *buffer) {
|
||||
if (doTexture) {
|
||||
const char *texcoord = "v_texcoord";
|
||||
// TODO: Not sure the right way to do this for projection.
|
||||
// This path destroys resolution on older PowerVR no matter what I do, so we disable it on SGX 540 and lesser, and live with the consequences.
|
||||
if (needShaderTexClamp && !(gl_extensions.bugs & BUG_PVR_SHADER_PRECISION_TERRIBLE)) {
|
||||
// This path destroys resolution on older PowerVR no matter what I do if projection is needed,
|
||||
// so we disable it on SGX 540 and lesser, and live with the consequences.
|
||||
bool badPrecision = (gl_extensions.bugs & BUG_PVR_SHADER_PRECISION_TERRIBLE) != 0;
|
||||
if (needShaderTexClamp && !(doTextureProjection && badPrecision)) {
|
||||
// We may be clamping inside a larger surface (tex = 64x64, buffer=480x272).
|
||||
// We may also be wrapping in such a surface, or either one in a too-small surface.
|
||||
// Obviously, clamping to a smaller surface won't work. But better to clamp to something.
|
||||
|
||||
Reference in new issue
Block a user