Open barcharcraz opened 7 years ago
Perhaps there's a way to get the game to always just use the linear buffer. That would be ideal.
FWIW I have a similar project at https://github.com/umautobots/GTAVisionExport (the native part) that gets correct depth and stencil on nvidia pascal platforms. Perhaps we can compare notes.
If the hardware supports it, I think this would be a great idea. For linear export from logarithmic one I used the game engine itself. It creates a smaller linear depth buffer for SSAO and I give it a full scale texture and re-render it.
Ahh. Unfortunately we need a full Rez depth buffer. I'm not sure if the linear depth is something gta does or something the nvidia drivers do
The depth buffer is rendered in full resolution. I don't think it's related to the drivers, since the game must have complete information about what data is inside the texture.
I guess I'll have to trace Tex creation. But the nvidia drivers do seem to redirect a whole lot of functionality (we actually tried to detour via vtbl editing and had to move to hotpatching and trampolines because the nvidia drivers were already touching almost all the vtbl entries multiple times) On Tue, May 9, 2017 at 1:32 PM ali-alidoust notifications@github.com wrote:
The depth buffer is rendered in full resolution. I don't think it's related to the drivers, since the game must have complete information about what data is inside the texture.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ali-alidoust/gta5-extended-video-export/issues/11#issuecomment-300242370, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPnvU95M7Cwat2huCSB-f_4k5KT9j6_ks5r4KMogaJpZM4NSaIp .
It looks like sometimes the depth buffer is already linear (I think it's when the game creates depth in a DXGI_FORMATR32G8X24_TYPELESS buffer as opposed to a DXGI_FORMAT_R24G8_TYPELESS one). I tested on a geforce 1080 and titan X pascal and got this 64bit depth stencil buffer on both, however I got the 32 bit buffer on an intel iris pro system.
I have verified that the depth buffer is indeed linear in this case as transforming pixels into world space yields correct results.