Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dante's Inferno - Graphics issue - Bloom #4845

Closed
fastrizwaan opened this issue Dec 15, 2013 · 78 comments · Fixed by #13251
Closed

Dante's Inferno - Graphics issue - Bloom #4845

fastrizwaan opened this issue Dec 15, 2013 · 78 comments · Fixed by #13251
Labels
GE emulation Backend-independent GPU issues
Milestone

Comments

@fastrizwaan
Copy link

The Game, Dante's inferno, plays fine but there's graphics issue:

The background seems to be mirrored in transparency, in the 1st screeshot, we can see the burning torches are shown, in the 2nd the "cross" on the wall is overlaid.

screenshot from 2013-12-15 20 52 04
screenshot from 2013-12-15 20 50 13

Here's video too!
http://www.youtube.com/watch?v=AhJspRA6Og4

@thedax
Copy link
Collaborator

thedax commented Dec 15, 2013

Looks like the same issue as Ridge Racer. Does it help if you change the rendering resolution?

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

I just tried it and not helping in this case

@fastrizwaan
Copy link
Author

no change with redering resolution, tried with 1x, 2x, 3x

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

Looks like it is caused by "Render to area containing texture"

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

Comment it out get of rid of the artifact .(Note : either change to AttachFramebufferValid or AttachFramebufferInvalid , didn't help)

        } else if ((entry->addr - address) / entry->bufw < framebuffer->height) {
            WARN_LOG_REPORT_ONCE(subarea, G3D, "Render to area containing texture at %08x", address);
            // TODO: Keep track of the y offset.
            // If "AttachFramebufferValid" ,  God of War Ghost of Sparta/Chains of Olympus will be missing special effect.
            //AttachFramebufferValid(entry, framebuffer);
        }

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

@unknownbrackets , i think this one is originally used for Sword Art Online ?

@unknownbrackets
Copy link
Collaborator

What is the address of the framebuffer and the address of the entry? Some of these were before misunderstood because the framebuffer address was incorrectly masked.

That said, it's still a fact that the PSP can render half way into a buffer or from half way into one, such as happens in Breath of Fire 3. This code is actually too conservative to fix Breath of Fire 3 currently, though.

-[Unknown]

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

18:22:364 user_main W[G3D]: GLES\TextureCache.cpp:231 Render to area containing texture at 04110000

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

address of the framebuffer = 04110000
address of the entry is 04110400

@unknownbrackets
Copy link
Collaborator

How big is the framebuffer, do you see it rendering to it? What's the bufw? Sounds like we are likely guessing a wrong size for it.

-[Unknown]

@dbz400
Copy link
Contributor

dbz400 commented Dec 16, 2013

The entry->bufw is 200 and framebuffer->height is 110
GLES
screen00163

SoftGPU
screen00164

@dbz400
Copy link
Contributor

dbz400 commented Dec 16, 2013

I did try to fix the drawing_width to let say the viewport or region .It didn't help either

@unknownbrackets
Copy link
Collaborator

So if it's 512px wide, and 272px tall, then depending on the bitdepth it either ends at 04154000 or 04198000.

04110400 is most definitely inside that. Theoretically, it's just offset by 1px, but it could also be doing what that other game was doing (#4739), and offsetting x (if it's 8888.)

-[Unknown]

@unknownbrackets
Copy link
Collaborator

What bitdepth is the framebuffer/texture? Can I see a screenshot of the GE debugger?

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Has this changed in the latest version at all with the framebuf size stuff?

I know it still has the subarea thing.

-[Unknown]

@fastrizwaan
Copy link
Author

with v0.9.8-1051 windows 7 64 bit ppsspp, the issue still there.
dante

@unknownbrackets
Copy link
Collaborator

Apparently this still lacks proper bloom, but now the artifact is gone.

-[Unknown]

@hrydgard hrydgard changed the title Dante's Inferno - Graphics issue - background image is superimposed Dante's Inferno - Graphics issue - Lacking bloom (previously: background image is superimposed) Jun 10, 2014
@unknownbrackets
Copy link
Collaborator

Maybe #6300 will help this? It'd help to know the texture address when the bloom is supposed to render (might be easier with an older build where it does render wrong.)

Maybe it's using a VRAM mirror...

-[Unknown]

@daniel229
Copy link
Collaborator

No,it does not help.Is it this address?next click is the artifact.

01

@daniel229
Copy link
Collaborator

Fixed by 0b9db17 a little flickering though.
08

@unknownbrackets
Copy link
Collaborator

Flickering?

-[Unknown]

@daniel229
Copy link
Collaborator

I think that bloom effect flickering.
Video(rename jpg to mp4)
01-muxed

@unknownbrackets
Copy link
Collaborator

It looks possibly misaligned. Maybe it's overestimating the height of a framebuffer... this happens at 1x, right? I'm guessing so.

What happens if you force drawing_height to 272? I'm guessing it's making something bigger. Maybe it's even clearing two bufers at once, y-ways, like God of War...

-[Unknown]

@daniel229
Copy link
Collaborator

Yes,this happen at 1x, force drawing_height to 272 seems no difference.
03

@unknownbrackets
Copy link
Collaborator

Can you grab some of the Est lines? Maybe the problem is it's over estimating to 272...

-[Unknown]

@daniel229
Copy link
Collaborator

Here
07:35:192 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:192 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:0, Z:00000000 = 512x272
07:35:193 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:195 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44000000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:195 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:198 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44110000 V: 512x128, R: 512x272, S: 512x128, STR: 512, THR:0, Z:44044000 = 512x128
07:35:201 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:201 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:0, Z:00000000 = 512x272
07:35:201 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:216 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44000000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:216 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:239 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:0, Z:44044000 = 512x272
07:35:241 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44110000 V: 512x128, R: 512x272, S: 512x128, STR: 512, THR:0, Z:44044000 = 512x128
07:35:242 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:242 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:0, Z:00000000 = 512x272
07:35:242 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:245 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44000000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:245 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:248 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44110000 V: 512x128, R: 512x272, S: 512x128, STR: 512, THR:0, Z:44044000 = 512x128
07:35:249 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:249 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:0, Z:00000000 = 512x272
07:35:250 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:266 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44000000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:266 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:289 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:0, Z:44044000 = 512x272
07:35:291 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44110000 V: 512x128, R: 512x272, S: 512x128, STR: 512, THR:0, Z:44044000 = 512x128
07:35:292 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:292 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:0, Z:00000000 = 512x272
07:35:293 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:295 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44000000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:295 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44088000 V: 480x272, R: 512x272, S: 480x272, STR: 512, THR:1, Z:44044000 = 512x272
07:35:298 user_main N[G3D]: GLES\Framebuffer.cpp:723 Est: 44110000 V: 512x128, R: 512x272, S: 512x128, STR: 512, THR:0, Z:44044000 = 512x128

@Saramagrean
Copy link
Contributor

Saramagrean commented Jul 11, 2019

Temporary fix: Use PPSSPP v1.7.1 Build 171 and enable BlockTransferAllowCreateFB can play game full speed without lacking bloom. :) (but since v1.7.1 Build 181 this solution isn't work)

Screenshot_PPSSPP_20190712-025610

@ghost
Copy link

ghost commented Jul 12, 2019

@Saramagrean Can I know what's your phone hardware specifications??..

@ghost
Copy link

ghost commented Jul 12, 2019

This commit of sir @hrydgard 442b570 has a fixed of Dantes Inferno @Saramagrean? 🤔
Can you give me the apk link seems that I can't connect right now in ppsspp buildbot 😔

EDIT: I finally downloaded v1.7.1-171 from buildbot using vpn I will test later Dante's Inferno on this version

@Saramagrean
Copy link
Contributor

@Saramagrean Can I know what's your phone hardware specifications??..

Huawei P9 Plus.

@Saramagrean
Copy link
Contributor

This commit of sir @hrydgard 442b570 has a fixed of Dantes Inferno @Saramagrean? 🤔

I don't think so...

@ghost
Copy link

ghost commented Jul 12, 2019

Still the same in my phone (arm32/Mali-450/OpenGL)

PPSSPP v1.7.1-171

Screenshot_2019-07-12-14-00-54
Screenshot_2019-07-12-14-18-00
Locking bloom effects is worst in ppsspp last build v1.8.0-407 the game is super lag also 😔
Screenshot_2019-07-12-14-00-39

@Saramagrean
Copy link
Contributor

@Emulatorer ...with enabled BlockTransferAllowCreatdFB in compat.ini file?

@ghost
Copy link

ghost commented Jul 12, 2019

@Saramagrean Yes
Screenshot

@ghost
Copy link

ghost commented Jul 12, 2019

But it's ok now I just need to enable other speed up in graphics settings also I use force 30fps to make this game playable on my potato phone 😌
Screenshot_2019-07-12-17-38-26
Screenshot_2019-07-12-17-37-51
I will play this game for a while and see if the locking bloom effects will show or not until I finish this game :)

@ghost
Copy link

ghost commented Jul 14, 2019

@Saramagrean sad to say issue still persist in some area 🤷😔

@Levan7
Copy link

Levan7 commented Jul 14, 2019

Still an issue on PC v1.8.0-414-g27608349e

@PilipinoAko
Copy link

How did you do that wow

@PilipinoAko
Copy link

This gloom is the one of the bug can't fix but in soft gpu can play it normal in open gl still not playable i hope can fix it

@ghost
Copy link

ghost commented Mar 11, 2020

PPSSPPv1.9.3-465

Screenshot_20200311-213236

Can this issue label as GE Emulation or Opengl?, since this issue is a backend dependant. Some of my friends can play this without locking bloom effects using Vulkan backend in their android phones

@ghost
Copy link

ghost commented Mar 12, 2020

GOOD NEWS!!!

No locking bloom effects on my tablet w/ mali-t720 gpu ogl 3.1 but still has a graphics issue though 😅
Screenshot_20200311-230523
Screenshot_20200311-230743
Screenshot_20200311-230817
Screenshot_20200311-230946

*USING PPSSPPv1.9.3-481

@hrydgard hrydgard added this to the v1.11 milestone Mar 15, 2020
@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Mar 15, 2020
@ghost
Copy link

ghost commented Mar 18, 2020

update

No locking bloom effects in OGL 3.1+ but characters image is transparent.

No changes in OGL 2.0+ this game always locking bloom effects so no chance for my phone w/ mali-450 gpu to play this game 😶

@ghost
Copy link

ghost commented Jun 4, 2020

Here is the dump, hope it's helps.
Dumped from PPSSPP v1.8.0-112, from iPhone7(A10), iOS12.1.2 jailbroken device.
ULES01384_0001.zip

Using the dump above.

HW rendering

Screenshot_20200604-172317HW

SW rendering

Screenshot_20200604-172253SW

@Halo-Michael
Copy link
Contributor

Halo-Michael commented Jun 6, 2020

This is the graphical performance of ULES01384_1.00 in v1.9.3-975-g6f07e2b48 (A ppdmp file, and a screen recording file):
https://github.com/Halo-Michael/PPSSPP-ULES01384_0001
Dumped from SE2(A13) iOS13.5 jailbroken with Unc0ver.
The problem is still a layer of translucent flashing shadows occupying the lower half of the screen

@hrydgard hrydgard changed the title Dante's Inferno - Graphics issue - Lacking bloom (previously: background image is superimposed) Dante's Inferno - Graphics issue - Bloom Aug 4, 2020
@hrydgard
Copy link
Owner

hrydgard commented Aug 4, 2020

Started looking into this (in the the Vulkan backend, using the GE debugger and RenderDoc)

The game does a fairly traditional bloom where you subtract some brightness from the game image, blurring that, and adding the result on top of the original image. It does this initial step by first drawing a gray rectangle, then using SUBTRACT blending to subtract it from the game image. Unfortunately that gray clear malfunctions somehow and only clears the upper half of the image, leaving garbage from the previous frame behind. This garbage being subtracted from the previous frame's garbage causes the flickering.

Apart from that, the bloom effect seems to work ok now.

The viewport seems screwed up during that clearing draw:

clear
clipped

While normal during the next draw:

next
non_clipped

I wonder if the viewport itself should actually clip at all. As we know, the PSP clipping solution is a bit ... different.

We might need to change our viewport translation logic to extend the viewport to at least cover the scissor region to fix this. It should be possible to just use the viewport clipping logic but use it to extend instead of shrink.

@hrydgard
Copy link
Owner

hrydgard commented Aug 5, 2020

The remaining bloom flicker is now fixed.

@Panderner
Copy link
Contributor

Good Job @hrydgard
Screenshot_2020-08-07-09-39-37-30_2f85358b2198d26f8aca533d68bee793
but this game needs to be set to buffered rendering

@hrydgard
Copy link
Owner

hrydgard commented Aug 7, 2020

Yup, no way getting around that, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.