[GH-ISSUE #3871] Shin Megami Tensei: Persona - The button outlines in the battle menu are drawn incorrectly #1586

Open
opened 2026-03-18 01:15:27 +03:00 by kerem · 38 comments
Owner

Originally created by @internetakias on GitHub (Sep 22, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/3871

screen00371
As you can see in the above screenshot, the outlines adorning the buttons break at some point and become missaligned for whatever reason.
In software rendering, by the way. They don't appear at all:
screen00369
Also, I'm not sure if this is related but this happens in the P3P status screen:
BR ON
image
BR OFF:
image

Originally created by @internetakias on GitHub (Sep 22, 2013). Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/3871 ![screen00371](https://f.cloud.github.com/assets/5077063/1186761/c520c0c6-2321-11e3-925f-2f6fb66085f7.jpg) As you can see in the above screenshot, the outlines adorning the buttons break at some point and become missaligned for whatever reason. In software rendering, by the way. They don't appear at all: ![screen00369](https://f.cloud.github.com/assets/5077063/1186780/558b5a1c-2323-11e3-8738-add667943473.jpg) Also, I'm not sure if this is related but this happens in the P3P status screen: BR ON ![image](https://f.cloud.github.com/assets/5077063/1186773/a2f54778-2322-11e3-9a50-b4d97dfd07f1.png) BR OFF: ![image](https://f.cloud.github.com/assets/5077063/1186774/d05d7424-2322-11e3-9f42-9a0410b3a691.png)
Author
Owner

@internetakias commented on GitHub (Sep 25, 2013):

Seems like the bug yields different results depending on wether BR is off or on
BR OFF:
screen00381
BR ON:
screen00380

<!-- gh-comment-id:25069880 --> @internetakias commented on GitHub (Sep 25, 2013): Seems like the bug yields different results depending on wether BR is off or on BR OFF: ![screen00381](https://f.cloud.github.com/assets/5077063/1207649/23d1f9bc-25bd-11e3-8a27-16b3378dea24.jpg) BR ON: ![screen00380](https://f.cloud.github.com/assets/5077063/1207652/2a2878e0-25bd-11e3-9c1e-cdb38dd898c9.jpg)
Author
Owner

@dbz400 commented on GitHub (Sep 25, 2013):

I think the question is ... Are these outlines exist on real PSP?

<!-- gh-comment-id:25069996 --> @dbz400 commented on GitHub (Sep 25, 2013): I think the question is ... Are these outlines exist on real PSP?
Author
Owner

@internetakias commented on GitHub (Sep 25, 2013):

image
Yeah

<!-- gh-comment-id:25070097 --> @internetakias commented on GitHub (Sep 25, 2013): ![image](https://f.cloud.github.com/assets/5077063/1207667/be20ccbe-25bd-11e3-8575-02b96d2128ae.png) Yeah
Author
Owner

@internetakias commented on GitHub (Sep 25, 2013):

Huh, seems like upscaling is the culprit here
1x res:
screen00382
Could this issue be related to #3332?

<!-- gh-comment-id:25070236 --> @internetakias commented on GitHub (Sep 25, 2013): Huh, seems like upscaling is the culprit here 1x res: ![screen00382](https://f.cloud.github.com/assets/5077063/1207678/1889ce9e-25be-11e3-8db3-edfc12f2fa03.jpg) Could this issue be related to #3332?
Author
Owner

@dbz400 commented on GitHub (Sep 25, 2013):

So 2x or above will have outlines issue ? i think it is all default setting and no textures up-scaling stuff turned on

<!-- gh-comment-id:25070347 --> @dbz400 commented on GitHub (Sep 25, 2013): So 2x or above will have outlines issue ? i think it is all default setting and no textures up-scaling stuff turned on
Author
Owner

@internetakias commented on GitHub (Sep 25, 2013):

Texture scalling doesn't have anything to do with this issue, it seems. Also, almost all of the buttons except the Persona and Guard ones have the top part of the outline placed one pixel above where it should be. But when they are selected, the Persona and Guard buttons are the ones displaying incorrectly
screen00385
screen00383
screen00384

<!-- gh-comment-id:25070672 --> @internetakias commented on GitHub (Sep 25, 2013): Texture scalling doesn't have anything to do with this issue, it seems. Also, almost all of the buttons except the Persona and Guard ones have the top part of the outline placed one pixel above where it should be. But when they are selected, the Persona and Guard buttons are the ones displaying incorrectly ![screen00385](https://f.cloud.github.com/assets/5077063/1207722/608f0e2e-25bf-11e3-8627-33e97c08e73b.jpg) ![screen00383](https://f.cloud.github.com/assets/5077063/1207723/60b8da24-25bf-11e3-8b79-08f83f2114a7.jpg) ![screen00384](https://f.cloud.github.com/assets/5077063/1207724/60ea5414-25bf-11e3-8e55-1bb306cbb0a3.jpg)
Author
Owner

@dbz400 commented on GitHub (Sep 25, 2013):

I see. Therefore , it is the internal resolution issue , right ? 1x fine but 2x or above looks bad

<!-- gh-comment-id:25070808 --> @dbz400 commented on GitHub (Sep 25, 2013): I see. Therefore , it is the internal resolution issue , right ? 1x fine but 2x or above looks bad
Author
Owner

@internetakias commented on GitHub (Sep 25, 2013):

Pretty much

<!-- gh-comment-id:25070857 --> @internetakias commented on GitHub (Sep 25, 2013): Pretty much
Author
Owner

@internetakias commented on GitHub (Sep 26, 2013):

Seems like on the latest build, the only difference between Buffered Rendering and Non-Buffered Rendering is that in Non-BR, all of the buttons are displaying incorrectly
screen00391

<!-- gh-comment-id:25201366 --> @internetakias commented on GitHub (Sep 26, 2013): Seems like on the latest build, the only difference between Buffered Rendering and Non-Buffered Rendering is that in Non-BR, all of the buttons are displaying incorrectly ![screen00391](https://f.cloud.github.com/assets/5077063/1221389/08184e4a-26eb-11e3-9c01-bb86e676dace.jpg)
Author
Owner

@internetakias commented on GitHub (Sep 26, 2013):

P2: Innocent Sin appears to be suffering from a similar issue
screen00392

<!-- gh-comment-id:25202695 --> @internetakias commented on GitHub (Sep 26, 2013): P2: Innocent Sin appears to be suffering from a similar issue ![screen00392](https://f.cloud.github.com/assets/5077063/1221480/2345a3be-26ed-11e3-86a9-dac1b22de9cb.jpg)
Author
Owner

@hrydgard commented on GitHub (Sep 26, 2013):

we could try using a bigger line thickness when resolution is higher.

<!-- gh-comment-id:25204688 --> @hrydgard commented on GitHub (Sep 26, 2013): we could try using a bigger line thickness when resolution is higher.
Author
Owner

@internetakias commented on GitHub (Sep 26, 2013):

If you're talking about the bar on the top, I've already opened an issue for that: #3332
Anyway
BR OFF:
screen00394
The lines making up the buttons' outlines aren't connecting properly to each other. Also, Feral Claw's icon is overlapping with the selected skill below.
BR ON:
screen00395
Here most of the button outlines are displaying correctly, but the inside of the buttons is affected by the issue I mentioned above.
Strangely enough, the outlines on the character windows are displaying incorrectly in both modes

While I'm still at it, FXAA seems to be messing up the fonts and textures in a number of games:
screen00393

<!-- gh-comment-id:25206316 --> @internetakias commented on GitHub (Sep 26, 2013): If you're talking about the bar on the top, I've already opened an issue for that: #3332 Anyway BR OFF: ![screen00394](https://f.cloud.github.com/assets/5077063/1221819/6307dee4-26f3-11e3-94d2-a26eddcdfa61.jpg) The lines making up the buttons' outlines aren't connecting properly to each other. Also, Feral Claw's icon is overlapping with the selected skill below. BR ON: ![screen00395](https://f.cloud.github.com/assets/5077063/1221833/78aecd20-26f3-11e3-9cf2-19573c98d1a3.jpg) Here most of the button outlines are displaying correctly, but the inside of the buttons is affected by the issue I mentioned above. Strangely enough, the outlines on the character windows are displaying incorrectly in both modes While I'm still at it, FXAA seems to be messing up the fonts and textures in a number of games: ![screen00393](https://f.cloud.github.com/assets/5077063/1221876/4513c3ca-26f4-11e3-8045-7aa7c18f6d26.jpg)
Author
Owner

@unknownbrackets commented on GitHub (Sep 27, 2013):

Hmm, makes sense. I wonder if points matter as well? Probably not so much.

Could probably just set the glLineWidth once per frame or on Resized.

-[Unknown]

<!-- gh-comment-id:25219111 --> @unknownbrackets commented on GitHub (Sep 27, 2013): Hmm, makes sense. I wonder if points matter as well? Probably not so much. Could probably just set the glLineWidth once per frame or on Resized. -[Unknown]
Author
Owner

@internetakias commented on GitHub (Oct 9, 2013):

I upgraded my PC today and I now have an NVIDIA GTX 760. So I'm here to report my findings:
When the Window Size and the Resolution are set to 1, the outlines appear correctly for the most part(the outline on the right side of the button is somewhat transparent)
screen00421
When the Window Size and Resolution are set to a value higher than 1, the outlines are displaying incorrectly again:
screen00422
Also, it seems like when the window size is set to 1, the higher the resolution is set to the more the outlines start dissapearing:

Rendering Resolution set to 2:
screen00424
Rendering Resolution set to 3:
screen00426
Rendering Resolution set to 10:
screen00423

<!-- gh-comment-id:25968695 --> @internetakias commented on GitHub (Oct 9, 2013): I upgraded my PC today and I now have an NVIDIA GTX 760. So I'm here to report my findings: When the Window Size and the Resolution are set to 1, the outlines appear correctly for the most part(the outline on the right side of the button is somewhat transparent) ![screen00421](https://f.cloud.github.com/assets/5077063/1297419/b20ba5e6-30e1-11e3-8f3b-4f93e7f616c9.jpg) When the Window Size and Resolution are set to a value higher than 1, the outlines are displaying incorrectly again: ![screen00422](https://f.cloud.github.com/assets/5077063/1297422/d62dac30-30e1-11e3-99e5-be8806277721.jpg) Also, it seems like when the window size is set to 1, the higher the resolution is set to the more the outlines start dissapearing: Rendering Resolution set to 2: ![screen00424](https://f.cloud.github.com/assets/5077063/1297444/5d913228-30e2-11e3-95dd-ae7823062e45.jpg) Rendering Resolution set to 3: ![screen00426](https://f.cloud.github.com/assets/5077063/1297446/6b2cff3e-30e2-11e3-9c7a-f238e8d3160b.jpg) Rendering Resolution set to 10: ![screen00423](https://f.cloud.github.com/assets/5077063/1297450/777b6bf4-30e2-11e3-9f24-53fd7395c724.jpg)
Author
Owner

@hrydgard commented on GitHub (Oct 9, 2013):

As I've said before, that's pretty normal. Running games at resolutions they don't expect doesn't always work flawlessly. It's possible that glLineWidth will make it look a little better though of course.

<!-- gh-comment-id:25969566 --> @hrydgard commented on GitHub (Oct 9, 2013): As I've said before, that's pretty normal. Running games at resolutions they don't expect doesn't always work flawlessly. It's possible that glLineWidth will make it look a little better though of course.
Author
Owner

@dbz400 commented on GitHub (Oct 9, 2013):

I try in this way in GL_Resized() , not too sure if it is the correct way to do it .

glLineWidth(g_Config.iInternalResolution);

@internetakias , test build here
ppssppwindows

<!-- gh-comment-id:25970923 --> @dbz400 commented on GitHub (Oct 9, 2013): I try in this way in GL_Resized() , not too sure if it is the correct way to do it . ``` glLineWidth(g_Config.iInternalResolution); ``` @internetakias , test build here ![ppssppwindows](https://f.cloud.github.com/assets/3000282/1297669/e71958aa-30e6-11e3-9c0f-8f8e057bfaf0.jpg)
Author
Owner

@hrydgard commented on GitHub (Oct 9, 2013):

You should probably set it to 1 if iInternalResolution is 0, otherwise that should be okay.

<!-- gh-comment-id:25971521 --> @hrydgard commented on GitHub (Oct 9, 2013): You should probably set it to 1 if iInternalResolution is 0, otherwise that should be okay.
Author
Owner

@dbz400 commented on GitHub (Oct 9, 2013):

Alright .

glLineWidth(g_Config.iInternalResolution == 0 ? 1 : g_Config.iInternalResolution);

<!-- gh-comment-id:25971777 --> @dbz400 commented on GitHub (Oct 9, 2013): Alright . glLineWidth(g_Config.iInternalResolution == 0 ? 1 : g_Config.iInternalResolution);
Author
Owner

@internetakias commented on GitHub (Oct 9, 2013):

@raven02
The link appears to be corrupted

<!-- gh-comment-id:25973246 --> @internetakias commented on GitHub (Oct 9, 2013): @raven02 The link appears to be corrupted
Author
Owner

@hrydgard commented on GitHub (Oct 9, 2013):

@internetakias , it's a file uploaded as a jpeg to work around github's rules, rename it to zip or something.

<!-- gh-comment-id:25973619 --> @hrydgard commented on GitHub (Oct 9, 2013): @internetakias , it's a file uploaded as a jpeg to work around github's rules, rename it to zip or something.
Author
Owner

@dbz400 commented on GitHub (Oct 9, 2013):

I confirm it works pretty good . This is comparsion at 2x

-without glLineWidth
screen00026

-glLineWidth(2)
screen00024

<!-- gh-comment-id:25973915 --> @dbz400 commented on GitHub (Oct 9, 2013): I confirm it works pretty good . This is comparsion at 2x -without glLineWidth ![screen00026](https://f.cloud.github.com/assets/3000282/1297961/8079a644-30ec-11e3-8e89-c32cebef4ffc.jpg) -glLineWidth(2) ![screen00024](https://f.cloud.github.com/assets/3000282/1297957/6ea75ae2-30ec-11e3-8373-cc8420a26e21.jpg)
Author
Owner

@hrydgard commented on GitHub (Oct 9, 2013):

Unfortunately it is not supported in OpenGL ES so you will have to surround the call to glLineWidth with

#ifndef USING_GLES2
     glLineWidth( ... )
#endif 

I guess we should turn lines into triangles to make them fat on ES... sigh.

<!-- gh-comment-id:25974206 --> @hrydgard commented on GitHub (Oct 9, 2013): Unfortunately it is not supported in OpenGL ES so you will have to surround the call to glLineWidth with ``` #ifndef USING_GLES2 glLineWidth( ... ) #endif ``` I guess we should turn lines into triangles to make them fat on ES... sigh.
Author
Owner

@dbz400 commented on GitHub (Oct 9, 2013):

I see.Will do and pull a request for it .

<!-- gh-comment-id:25975221 --> @dbz400 commented on GitHub (Oct 9, 2013): I see.Will do and pull a request for it .
Author
Owner

@dbz400 commented on GitHub (Oct 9, 2013):

I do think fatten lines into triangles would be better approach since there are quite many games have similar issues on Android that i observed .

<!-- gh-comment-id:25975648 --> @dbz400 commented on GitHub (Oct 9, 2013): I do think fatten lines into triangles would be better approach since there are quite many games have similar issues on Android that i observed .
Author
Owner

@hrydgard commented on GitHub (Oct 9, 2013):

oh yeah. Try this quick approximation:

if (g_Config.iInternalResolution == 0) {
    glLineWidth(std::max(1, (int)(PSP_CoreParameter().renderWidth / 480)));
} else {
    glLineWidth(g_Config.iInternalResolution);
}
<!-- gh-comment-id:25976664 --> @hrydgard commented on GitHub (Oct 9, 2013): oh yeah. Try this quick approximation: ``` if (g_Config.iInternalResolution == 0) { glLineWidth(std::max(1, (int)(PSP_CoreParameter().renderWidth / 480))); } else { glLineWidth(g_Config.iInternalResolution); } ```
Author
Owner

@dbz400 commented on GitHub (Oct 9, 2013):

I used yres and seems to be working okay :)

<!-- gh-comment-id:25977266 --> @dbz400 commented on GitHub (Oct 9, 2013): I used yres and seems to be working okay :)
Author
Owner

@hrydgard commented on GitHub (Oct 9, 2013):

Probably it's so large OpenGL rejects it because yres will be hundreds of pixels :)

<!-- gh-comment-id:25977530 --> @hrydgard commented on GitHub (Oct 9, 2013): Probably it's so large OpenGL rejects it because yres will be hundreds of pixels :)
Author
Owner

@dbz400 commented on GitHub (Oct 10, 2013):

@internetakias , can you recheck and confirm the issue fixed?

<!-- gh-comment-id:26022847 --> @dbz400 commented on GitHub (Oct 10, 2013): @internetakias , can you recheck and confirm the issue fixed?
Author
Owner

@internetakias commented on GitHub (Oct 10, 2013):

Will do

<!-- gh-comment-id:26043107 --> @internetakias commented on GitHub (Oct 10, 2013): Will do
Author
Owner

@internetakias commented on GitHub (Oct 10, 2013):

Seems to work fine now.
screen00425

The outlines still don't connect properly with each other though. Even at 1x res
screen00427

<!-- gh-comment-id:26043327 --> @internetakias commented on GitHub (Oct 10, 2013): Seems to work fine now. ![screen00425](https://f.cloud.github.com/assets/5077063/1305475/07dbcb8e-3198-11e3-942a-28a574ba7c9d.jpg) The outlines still don't connect properly with each other though. Even at 1x res ![screen00427](https://f.cloud.github.com/assets/5077063/1305476/0fe5570a-3198-11e3-9537-52c78846d539.jpg)
Author
Owner

@internetakias commented on GitHub (Dec 12, 2013):

By the way, I haven't checked on 0.9.6 yet, but it seems like raven's fix doesn't work for Android

<!-- gh-comment-id:30431644 --> @internetakias commented on GitHub (Dec 12, 2013): By the way, I haven't checked on 0.9.6 yet, but it seems like raven's fix doesn't work for Android
Author
Owner

@dbz400 commented on GitHub (Dec 14, 2013):

Yes , the fix is for windows only since GLES not support glLineWidth

<!-- gh-comment-id:30575396 --> @dbz400 commented on GitHub (Dec 14, 2013): Yes , the fix is for windows only since GLES not support glLineWidth
Author
Owner

@unknownbrackets commented on GitHub (Jan 20, 2014):

The lines still look pretty bad in GLES in Persona 1. I'm not really sure why.

Some of the lines are missing in softgpu. It seems to be some glitch or overflow, because it thinks it's being asked to draw a line from 1023,4 - 128,4 (it really should be from 0,4 - 128,4.)

It's actually reading -1,4 - 128,4 from the vertex, but somehow it's wrapping that to 1023 in throughmode... hmm.

As for Persona 3, there's no outline in GLES right now (any resolution), which I think may be correct (I mostly only played the console version)? The outline does show in softgpu and isn't completely awful (assuming it should be there...), although it's not perfect at all.

-[Unknown]

<!-- gh-comment-id:32740771 --> @unknownbrackets commented on GitHub (Jan 20, 2014): The lines still look pretty bad in GLES in Persona 1. I'm not really sure why. Some of the lines are missing in softgpu. It seems to be some glitch or overflow, because it thinks it's being asked to draw a line from 1023,4 - 128,4 (it really should be from 0,4 - 128,4.) It's actually reading -1,4 - 128,4 from the vertex, but somehow it's wrapping that to 1023 in throughmode... hmm. As for Persona 3, there's no outline in GLES right now (any resolution), which I think may be correct (I mostly only played the console version)? The outline does show in softgpu and isn't completely awful (assuming it should be there...), although it's not perfect at all. -[Unknown]
Author
Owner

@unknownbrackets commented on GitHub (May 14, 2017):

The outline in Persona 3 should not be there - it's antialiasing. With #9684, lines largely work in software rendering for all the above cases.

As far as other backends:

  • Persona 3: the outline in the menu is present, and incorrect (same issue as #6483.)
  • Persona 1 and 2: the UI lines are incorrect, even at 1x. It seems like an origin issue: if all lines were drawn 0.5 pixels lower and to the right, it might work better. Width is also an issue.

Note that skip buffer effects ("non buffered rendering") essentially means increased render resolution, and both cause line width issues.

-[Unknown]

<!-- gh-comment-id:301347520 --> @unknownbrackets commented on GitHub (May 14, 2017): The outline in Persona 3 should not be there - it's antialiasing. With #9684, lines largely work in software rendering for all the above cases. As far as other backends: * Persona 3: the outline in the menu is present, and incorrect (same issue as #6483.) * Persona 1 and 2: the UI lines are incorrect, even at 1x. It seems like an origin issue: if all lines were drawn 0.5 pixels lower and to the right, it might work better. Width is also an issue. Note that skip buffer effects ("non buffered rendering") essentially means increased render resolution, and both cause line width issues. -[Unknown]
Author
Owner

@ghost commented on GitHub (Jun 4, 2020):

Anyone can you upload a ge dump?

<!-- gh-comment-id:638725693 --> @ghost commented on GitHub (Jun 4, 2020): Anyone can you upload a ge dump?
Author
Owner

@unknownbrackets commented on GitHub (Oct 31, 2021):

I haven't tested this, but #15076 may help.

-[Unknown]

<!-- gh-comment-id:955797746 --> @unknownbrackets commented on GitHub (Oct 31, 2021): I haven't tested this, but #15076 may help. -[Unknown]
Author
Owner

@ghost commented on GitHub (Nov 1, 2021):

ppsspp v1.12.3-136

Vulkan
Screenshot_2021-11-01-20-07-56-209_org ppsspp ppsspp

Software
Screenshot_2021-11-01-20-10-53-740_org ppsspp ppsspp

<!-- gh-comment-id:956181444 --> @ghost commented on GitHub (Nov 1, 2021): ppsspp v1.12.3-136 **Vulkan** ![Screenshot_2021-11-01-20-07-56-209_org ppsspp ppsspp](https://user-images.githubusercontent.com/37603562/139669448-6b7c42a2-367e-4d69-b735-0aa73af771a0.jpg) **Software** ![Screenshot_2021-11-01-20-10-53-740_org ppsspp ppsspp](https://user-images.githubusercontent.com/37603562/139669478-15bbee43-2cd8-47cf-bfd2-26ea96aa0bfb.jpg)
Author
Owner

@unknownbrackets commented on GitHub (Nov 2, 2021):

Yeah, doesn't seem to be fixed.

For one of the outlines in the menu (not battle, but seems like the same problem), it uses 5 verts for a line strip:

-24,50 -> -24,32
-24,32 -> 109,32
109,32 -> 109,51
109,51 -> -24,50

Software rendering gets this right, but as you can see the problem is the strip has the bottom right corner slightly lower.

In hardware rendering, it looks like this though:

Offset line

Because it goes up halfway through the line. But the software rasterizer gets it right:

Straight line

The red highlighted area in both cases is a triangle strip, but essentially it's a rectangle from 0,33 -> 109,50. It does seem like somehow the top line (rightward) is still going upward, not downward as it should. The slanted line is the leftward line.

-[Unknown]

<!-- gh-comment-id:957141114 --> @unknownbrackets commented on GitHub (Nov 2, 2021): Yeah, doesn't seem to be fixed. For one of the outlines in the menu (not battle, but seems like the same problem), it uses 5 verts for a line strip: -24,50 -> -24,32 -24,32 -> 109,32 109,32 -> 109,51 109,51 -> -24,50 Software rendering gets this right, but as you can see the problem is the strip has the bottom right corner slightly lower. In hardware rendering, it looks like this though: ![Offset line](https://user-images.githubusercontent.com/191233/139797484-2c3078b7-bc02-4ba8-ab12-51be395ee141.png) Because it goes up halfway through the line. But the software rasterizer gets it right: ![Straight line](https://user-images.githubusercontent.com/191233/139797662-1f5ba1b4-2ec1-45b0-98f9-3495be17fd19.png) The red highlighted area in both cases is a triangle strip, but essentially it's a rectangle from 0,33 -> 109,50. It does seem like somehow the top line (rightward) is still going upward, not downward as it should. The slanted line is the leftward line. -[Unknown]
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ppsspp#1586
No description provided.