-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Burnout dominator have lighting issue (recursive rendering in framebuffer border) #11100
Comments
EDIT: This is actually not what's going on! See #11100 (comment) below. |
Not certain but quite likely! |
@hrydgard so what with this? Still waiting?( If yes no problem but depth buffer readback can fix lot of games) |
+interresting in this game Is that, when you are rotated to the sun, you will get really big performance decrease. |
Hm, I thought the big perf decrease was only in Burnout Legends, where it currently does do a readback when the sun is visible.. |
If we will fix it can it fix performance? |
@marosis Turning off "Simulate block transfer" fixes the performance issue. |
|
No sun light issue on my phone mali-450 gpu opengl PPSSPP v1.10.3-725 git build |
@Gamemulatorer the sun issue still happens in-game. When i making the GE Dump for sun in the tunnel or building the sun disappears. Here's a GE Dump: |
Maybe opengl 2.0 device are not affected by this issue 😅 |
@Gamemulatorer could you send me the screenshot of this game are you playing? |
Weird that it's so slow. I'm gonna have to investigate how the sun is done in this game too. We've solved the sun in Legends as good as we can get it, I think, though... |
Performance is good on my phone with sun is showing @1x rendering resolution but the graphics is too much pixelated unlike before 🙁 |
@Gamemulatorer change the texture filtering to linear since the auto in texture filtering uses nearest for Burnout games all other games uses linear since the BlockTransferAllowCreateFB change for Burnout Legends |
There's gonna be some new mipmapping option soon that will help fight the pixellated look as well that some games have. |
This issue can still reproduce in the latest build v1.13.1-131 |
Burnout Dominator ULES00703_0002.zip << GE framedump VRAM locations: 00000/88000 : Main color framebuffers, 8888 After step 6432, it does a block transfer, copying away the 14x14 sun location for later to RAM. Then it draws a red 14x14 rectangle to the framebuffer at the sun position, Then it draws another one but white, this time with depth test. I think these two draws together extracts a sky mask from the depth buffer, effectively. No difference in the stencil test, so that part might be irrelevant. Now, for whatever reason it configures a giant 1024x1024 texture size but still 512 stride. This seems to cause us to miss matching the framebuffer, maybe? not sure, looks odd in the GE debugger. Texture and framebuffer are both 40880000 / 4000000, 8888 format. Renders to itself multiple times out in the border, so a Killzone-like split could be workable to reduce the size of the copy. It does a 2x2 shrink at at time, except the last one is a 4x1, which now thus has a 2x1 gradient of sun brightness stretched across 4 pixels. (The downsampling isn't working too great because we run at too high resolution... Might need trickery here) Then is does two block transfers: One appears to restore the 14x14 rectangle to the image from RAM (see the first copy). The other initializes the CLUT at 04176000 with some default data from RAM.
No idea why it sets up level 4 and 5, only 1 level is used, so we can ignore that. This draw call is very strange because it doesn't even have blending enabled, I'd have expected it to take the value and brighten/darken the CLUT, but instead it seems to replace some bits in it using the bitmask (which we're gonna have to enable...). Anyway, while writing to the flare CLUT, it samples a single texel from a 4x1 texture at 88780 which is an offset inside the main framebuffer, specifically the 4x1 summary texels from the pyramid downsampling. BUT! It samples it as if it was CLUT8 and at x=1.5! Also it uses depth testing when drawing to the CLUT and has its own little Z buffer! No idea what for. Or maybe it uses an alternating-pixel Z buffer in order to avoid writing to the lower bit, when using 16-bit rendering to poke alpha components into a 32-bit buffer? (Yes!) This is the CLUT it puts it through while drawing to what will become the final CLUT: Does seems like a blue-green gradient. It places the bits into the blue and green channel so they'll come through into a 32-bit alpha channel when masked with the color bits and and the specially prepared z buffer to remove what would otherwise be writes to the 8-bit green channel... In the end, once it has the modified CLUT, it draws a bunch of quads using this texture, and the CLUT as interpreted as 32-bit, thus with modified alpha that comes from the sun coverage. The messing-around-with-color-channels thing is kinda characteristic for PS2 ports, which this game is... Oh found another bug in the GE debugger, block transfer size isn't consistent between disassembly and the parameter viewer tabs, there's an off by one. |
Did some tests for width/height of textures, in case related. For 8888 textures (largest) through or transform, textures up to 512x512 work just as everyone knows and expects. For example, suppose I drew x 1024x1 texture to the screen at 256x256 with S set to CLAMP. I would see the leftmost 512 texels reduced down to the left 128 pixels. The right half would all be the 512th texel repeated. Switching to WRAP would repeat the left side on the right. It would in any case be impossible to sample the right 512 texels. The same behavior replicates for height. This pattern is consistent for all texture formats, from CLUT4 to 8888. So in this case, as long as it only samples from the first 512x512, it may "just work", and only really affects the UV -> ST coordinates (1.0f would map to 1024, even though the actual texture data is 512x512.) -[Unknown] |
OK, so things that go wrong right now:
There's a LOT of moving parts... |
Burnout.Lens.Flare.mp4Phew, with a pile of hackery it works :) Now to generalize and make nice, and also ideally make it work at higher res... |
The SUN still no show using opengl backend. |
Yeah, I know. It does work on desktop GL, but I'll have a look at mobile too soon... |
So this broke again with e5d6711 , which is not all that surprising, but we'll have to add some additional checking. |
We have to assume that ForceLowerResolutionForEffects has been set for good reason - in this case, the effect probably can't safely function without it. Fixes #11100 once again.
Sun in the tunel?!? OK!!!!!
Backend: OpenGL
The text was updated successfully, but these errors were encountered: