Another DirectX 11 demo
Results 1 to 16 of 16

Thread: Another DirectX 11 demo

  1. #1

    Another DirectX 11 demo

    Hi!

    I wanted to have something more impressive by now, but I still can't get a lot of things right. I'm also very busy at work these days and expect this to continue, so I just wanted to share what I've got so far.

    Here's a zip with "shaders11" folder and "d3d8.dll":
    https://1drv.ms/u/s!AvmtwF9vPtwVgdUm...IpEoA?e=AtqaKs

    If you already have DX9 shaders, you likely won't even need to run cfs3config. However, if you use additional keyboard/joystick controls available in the latest DX9 version - these controls won't work. Existing keybindings shouldn't be lost unless you try to edit them, but I'm not 100% sure about it. Maybe make a backup of xca file.

    Do NOT worry about reporting any bugs. It will be good if it at least works
    But I appreciate if you make any interesting screenshots.


    Highlights of this demo:
    - Another iteration of 3d clouds, now with shadows. Should be better that the one I shown last year, but still far from perfect.
    - Terrain "details" which are supposed to be based on surface types (concrete, grass, etc) but currently aren't and just pretend to be "rough" terrain.
    - Procedural water, but colors are hard-coded and aren't based on reflections or sky color.
    - Just for fun - there are now planets in their correct positions as of any day. However due to badly tuned lighting you may see stars at daytime.

  2. #2
    Great to hear from you Andrey! This is great, love seeing the progress first hand! I tested first without running the config tool, but my resolution got reset to 16bit and CFS3 didn't load. Changed back to my normal resolution and other settings were left unchanged. Sim loaded fine. FPS was down in the 20s, compared to my normal 45-60 at the same settings with the latest dx9 version, but was surprisingly smooth considering this. No crashes, seems much more stable than the last DX11 version I tried.

    Highlights:
    -3D clouds look like they are coming along nicely. The lighting change when flying through one feels very realistic.
    -Horizon improvements, color tint in the distance feels a bit off, I think with some tweaking it will produce a very nice effect -much better than the stock skybox for sure!
    -Water looks very good up close, nearly impossible to tell that it's really a flat surface, in fact at first I thought you'd figured out how to make the waves 3d.

    Looking forward to where this goes.

  3. #3
    Thanks!
    Getting right colors is very difficult, because they are produced by light extinction and scattering formula instead of being set directly.

    Speaking of performance - I did some optimizations, but they are incomplete.
    You can edit shaders11\SkyRender.hlsl, and near the beginning there are two lines:

    #define TILESIZE 2
    //#define REPROJ

    You can change tile size to 4 and it will improve performance a lot at the cost of more pixelated look of the clouds, especially at the distance. You can even set it to 8 or 16 and it should be faster, but will look funny. Setting tile size to 1 will produce "ultra" quality, but also likely to result in single digit FPS.

    However to get rid of pixelation with larger tiles you can also remove "//" from REPROJ line. This will make sky appear at full resolution by using a trick that recombines new pixels with previous frame. This works good for distant clouds but may cause ghosting for nearby ones. Can be used at any tile size, except 1 obviously.

  4. #4
    Yea I tested it too, pretty much the same as Dan said above. I did try and take some screen shots, but it wont let me, any idea Andrey? (When I take the shaders out, the screenshots work again)
    I also noticed there is no reflective shine on metal aircraft.

    I know it's only at beta stage, and the colours are off, but it's going in the right direction, get the lighting at the right angle and it looks stunning!
    I'll try the tweaks you mentioned later, thanks.
    John
    (DR/ MAW/ ETO/ PTO Textures)

    Keep it coming!

  5. #5
    Oh, right. I forgot that CFS3 screenshot key doesn't work with DX11 yet, but Print Screen key should work as usual.

    Metal shine is tricky.
    Of course DX11 version doesn't have any reflections yet (they are partially implemented, but disabled in this demo), but metallic surfaces don't work at all.
    Original CFS3 draws metal in 2 steps - first pass renders it as ordinary surface, and then a second pass overlays the reflective layer.

    Modern shaders don't need this, and it actually would have been more difficult to make this approach work with shadows and other features.

    So for DX9 version I implemented a slightly ugly piece of code which detects this "two pass shine" and combines it into a single pass while adjusting material settings. However, it doesn't work at night, because CFS3 simply skips the reflective layer. While it is understandable that there shouldn't be much to reflect at night anyway, it is still noticeable in some cases.

    For DX11 I wanted a better solution so I dug deeper and found how CFS3 stores material settings in memory, and now DX11 shaders can detect metallic surfaces directly. The problem is that I still need CFS3 to provide the "_r" texture, and I don't have a solution for this yet.
    Of course I can figure something out, but I wanted to get more important parts to work first.

  6. #6
    This is without any modifications.

    The lighting was pretty dark.

    Flying through the 3D clouds is a lovely experience of smoothly moving in and out the mist. The only visual anomaly I noticed is the horizontal banding in the clouds.

    Overall the FPS ranged from 36 to 96 (typically this scenario runs consistently in the 90s with dx9). The FPS was higher between the clouds, and dropped as I approached one, but went up somewhat again while inside.



    Right Click and Open the Image in a new Tab to see it full size.
    US Army, Major, Ret.

    Service To The Line,
    On The Line,
    On Time

    US Army Ordnance Corps.

  7. #7
    MajorMagee, thanks!

    36 FPS is too low, of course. I'm sure upcoming MS FS will work better on your GPU
    As I mentioned there's still some room for optimization, but "flying near clouds" is likely to be the worst case anyway.

    I think the banding is caused by shadows - it is tricky (as is everything else), but I believe I will be able to fix it.

    And yes, lighting tends to be darker than it should be.

  8. #8
    Thanks for the reply, yea I get you, here's a bit of eye candy!
    I used the tweaks, it was better but frames are still well down, but usable.





    John
    (DR/ MAW/ ETO/ PTO Textures)

    Keep it coming!

  9. #9
    Great looking clouds with the sunset!

    John, where did that Pilot Fatigue value come from on the stat readout? Never seen that before.

  10. #10
    No idea Dan, this is a complete stock install, apart from the Fw 190, (cant use stock lol) Never used this install, apart from a quick test after installation, just tough I'd try these new shaders in it
    Stock Briggs is the pilot.
    Attached Thumbnails Attached Thumbnails Screenshot (6).jpg  
    John
    (DR/ MAW/ ETO/ PTO Textures)

    Keep it coming!

  11. #11
    Well, nevermind, it's in my install too. Somehow I'd never noticed even though I frequently have it up while testing.

  12. #12
    lol
    John
    (DR/ MAW/ ETO/ PTO Textures)

    Keep it coming!

  13. #13
    Must be getting old or something. Yeah, that stock 190 is impossible to go back to now.

  14. #14
    Has anything further come of these shaders? I have them in a stock install and they work okayish, but I'd love to see an optimised version with all the usual features in the DX9 version at some point .

  15. #15
    lythronax, I'm surprised anyone uses this version!

    No new DX11 shaders since then. I've managed to improve some things (like much more correct sun/sky colors) since this "release", but still couldn't get it to work with acceptable quality. And eventually just got burned out. Sometimes I want to try again, but I doubt I'll get back to it.

  16. #16

    Icon5

    Quote Originally Posted by AnKor View Post
    lythronax, I'm surprised anyone uses this version!

    No new DX11 shaders since then. I've managed to improve some things (like much more correct sun/sky colors) since this "release", but still couldn't get it to work with acceptable quality. And eventually just got burned out. Sometimes I want to try again, but I doubt I'll get back to it.
    Any progress on DirectX 11?

Members who have read this thread: 3

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •