tacca Posted February 19, 2016 Share Posted February 19, 2016 Hey Everyone So I've come back to my NVG mod after a month or so break to try and access the Depth Map (used for the DOF effect in F2 view etc) to enable a Depth of field within the NVG. The break has been good since after only an hour or 2 of playing with the post effect codes I isolated the Depth Map within the DOF.fx shader and also came close to linearising it without have any of the world or camera view matrix's usually needed (see pics). Now my big issue is no matter what I try I cant access the same depth map while in the cockpit view. I tried copying the DOF code straight into the nvd.fx shader while changing the technique name to the appropriate NVG one (FinalPass, which I also tested with some basic coloured shader code to make sure the basics were right) and for the life of me I cant get any depth Data So, as my title asks, does anyone if a depth map exists for within the cockpit view that can be accessed from the NVG shader? A gentleman on this thread http://steamcommunity.com/app/223750/discussions/0/537402115071692491/#c527274088392509651 is adamant that there is one but I'm not entirely sure. Lots of thanks in advance Frenchy Ultimate JSMGE Guide for DCS - Video Version ----------- Frenchy's NVG mod for DCS 1.5 and 2.0 ----------- Mirage 2000 photoshop livery templates ----------- Frenchy :) Link to comment Share on other sites More sharing options...
Weltensegler Posted February 25, 2016 Share Posted February 25, 2016 I don't know the answer but I assume there is currently no Z-buffer for in cockpit. According to performance increase and decrease between cockpit and external views (and simple visual judgment) there is no such effect coded for cockpit view unless ED did so but disabled it because it adds too much of a performance hit within the cockpit. Which of course I hope is the case :) Maybe you can look into the DoF lua and figure out how its done to apply it to cockpit view. Possible though its calculation could still hit fps badly. 4790K@4,6Ghz | EVGA Z97 Classified | 32GB @ 2400Mhz | Titan X hydro copper| SSD 850 PRO ____________________________________ Moments in DCS: --> https://www.youtube.com/user/weltensegLA --> WELD's cockpit: --> http://forums.eagle.ru/showthread.php?t=92274 Link to comment Share on other sites More sharing options...
tacca Posted February 27, 2016 Author Share Posted February 27, 2016 (edited) I don't know the answer but I assume there is currently no Z-buffer for in cockpit. According to performance increase and decrease between cockpit and external views (and simple visual judgment) there is no such effect coded for cockpit view unless ED did so but disabled it because it adds too much of a performance hit within the cockpit. Which of course I hope is the case :) Hey Weltensegler. First off thanks for the response. Depth buffers and view matrix conversions/calculations etc are the bread and butter of graphics cards and MUST be preformed when rendering the scene. Performance wise they have very minimal impact (zero in perceptible terms) but the be data may be dropped from memory at different points in the render pipeline. Maybe you can look into the DoF lua and figure out how its done to apply it to cockpit view. Possible though its calculation could still hit fps badly. As i wrote in my first post this is exactly what I've done (see screen shots). I have extracted the depth buffer when in external view but cant access it in cockpit view. The fact that its there for the external view (and the page i linked) made me hope its there for the cockpit render pipeline but maybe called something else Again, the performance impact you see when the DOF effect is applied is because of the DOF shader, not the depth buffer itself. The DOF effect depending on parameters can run up to 150 samples of nearby pixels for each and every pixel rendered to your screen hence the noticeable impact on fps (its coded well for realism but not for performance). Many games have a very efficient and effective DOF code that journal papers etc have been written on. See here https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch28.html for a great example. Edited February 27, 2016 by tacca Ultimate JSMGE Guide for DCS - Video Version ----------- Frenchy's NVG mod for DCS 1.5 and 2.0 ----------- Mirage 2000 photoshop livery templates ----------- Frenchy :) Link to comment Share on other sites More sharing options...
Recommended Posts