LGhassen / Deferred

Add deferred rendering to KSP
Other
47 stars 0 forks source link

FreeIVA exterior textures missing #25

Open theodorhansson opened 4 days ago

theodorhansson commented 4 days ago

On a fresh install using only Deferred 1.1.12 and FreeIVA some textures are transparent/missing when looking out from a spacecraft's window at another part belonging to the same spacecraft. See the debug screenshots below.

Exterior screenshot0 screenshot1 screenshot2 screenshot3 screenshot4 screenshot5 screenshot6 screenshot7

theodorhansson commented 4 days ago

Also, it works fine if FreeIVA isn't installed. screenshot10

JonnyOThan commented 2 days ago

Agh. The way FreeIva normally handles this is by relying on the transparent window geometry to write to the depth buffer so that the internals of distant parts don't get drawn on top of everything else during the internal camera pass. Is it possible to render the transparent meshes that have z-write during the geometry pass? Or do we need to do something more complicated?

More details here: https://github.com/FirstPersonKSP/FreeIva/wiki/Everything-you-never-wanted-to-know-about-depth-masks

LGhassen commented 1 day ago

Thanks for the info @JonnyOThan, should be easy to put back z-writing, I probably didn't have it enabled in my replacement shader or something similar.

JonnyOThan commented 1 day ago

Does deferred still respect the render queue ordering for transparent shaders? FreeIva also adjusts those to make sure that these windows draw before opaque things.