Skip to content

LA Rush blending oddity causing multiple framebuffer copies per frame #20201

@hrydgard

Description

@hrydgard

Seems like a fairly simple vertex buffer space management problem.

Ran into this when I saw that the lens flare wasn't working right and forced on the occlusion rasterizer. The game draws an insane amount of geometry!

LA Rush also has a different quirk - near the end of the frame, it overdraws a lot of the road surfaces with a detail texture. Unfortunately, doing so, it uses a blend mode that we need a framebuffer copy to emulate. And it does a lot of these, so we end up with like 30 full screen copies, which is pretty far from optimal... We could probably try to consolidate them into a single draw with some hacks, maybe.

The bad blend mode used when applying the detail texture is:

eq: GE_BLENDMODE_MUL_AND_ADD  (default)
srcFunc: GE_SRCBLEND_FIXA  (set to zero, so effectively GL_ZERO)
dstFunc: GE_DSTBLEND_DOUBLESRCALPHA  (this is not available on PC)

Actually a fairly tricky one to emulate with regular blend equations :( though the game would still look good if we replaced it with something simpler. We could double src alpha in the shader, but it'll clamp before the blending equation, unless we switch the framebuffer to floating point which is itself expensive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GE emulationBackend-independent GPU issues

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions