Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FANTASTIC shader enhancement for water

Featured Replies

1) Copy the contents Jase's Text file into notebook and save it to your desktop, or a temporary directory, as "Water20.fxh"2) Rename or back-up the original Water20.fxh file located in the "ShadersHLSLTerrain" directory of your FSX installation (in case you want to restore it later if you don't like the effect).3) Copy the new Water20.fxh file that you created into the directory indicated in step 2.4) For XP users, navigate to "C:/Documents and Settings/YOUR NAME/Local Settings/Application Data/Microsoft/FSX/Shaders/Terrain" OR for Vista users to "C:/Users/YOUR NAME/AppData/Local/Microsoft/FSX/Shaders/Terrain" and back up all of the files located there in case you wish to restore them later.5) Delete the files located in the directory indicated in step 4.(These will be re-generated when FSX is started)6) Start FSXYou should now see the new water shader effect.Dave

David Webster

AMD Ryzen 7 5800X3D | G.Skill 32GB DDR4 3600Mhz | EVGA RTX 3080 Ti @ 3440X1440 | Crucial 2TB M.2 | Win11
 

  • Replies 168
  • Views 31k
  • Created
  • Last Reply

Top Posters In This Topic

Using Vista 32, witrh FSX SP2 and only about 6 files regenerated and I saw no difference in the look of the water.

Make sure you are using the newer text file from Jase's post #91 and not the one from post #76. The old one was the same as the FSX SP2 original.If you are using the correct one already, I'm not sure what to suggest. I run FSX under DX9 (XP) and I am seeing the new shader effect on my 8800GT using any of the 2.x water settings. Dave

David Webster

AMD Ryzen 7 5800X3D | G.Skill 32GB DDR4 3600Mhz | EVGA RTX 3080 Ti @ 3440X1440 | Crucial 2TB M.2 | Win11
 

I haven't quite figured it, but FSX doesn't consistently regen the contents of the Local SettingsApplication DataMicrosoftFSXShadersTerrain folder.It's sufficient to simply delete the file:Water20.fx_0x0000000000000000_0x0f (or something similar)...and leave the others.J

Dave Barnes' 6 step installation guide worked great for me, and I have SP2 but no Acceleration. Thanks all, great enhancement. Geofa, did you get your problem worked out? Cheers,http://www.my-buddy-icon.com/Icons/objects/red_3d_plane.gifAlex ChristoffN562ZBaltimore, MD

PowerSpec G426 PC running Windows 11 Pro 64-bit OS, Intel Core i7 11700K @ 3.60GHz 30 °C, 4089MB NVIDIA GeForce RTX 4070 , ASUS TUF Z590-Plus Gaming motherboard, Samsung 870 EVO 2TB SSD, Samsung 750 EVO 500GB SSD, Acer Predator X34 34" curved monitor (external view), RealSim Gear G-1000 avionics suite, RealSim Gear GNS 450, Slavix Stay Level Custom Metal Panel, Honeycomb Alpha Yoke, Redbird Alloy THI, Saitek Combat Rudder Pedals.

Hi everyone,I just joined the forum so I could share my edit of this great shader mod. I've been fiddling for a few hours and I've made a few modifications which I think greatly improve the look with this shader.1. I have managed to increase the saturation of the base texture colours so that you can now see the colour of the water better2. I reduced the specular reflections so they aren't quite so harsh3. I managed to get rid of the diffuse lighting from the moon (been tring to get rid of this for ages!). This was creating all the problems with milky looking water - even during the day. Now at night you just get specular reflections from the moon and no diffuse.4. I reduced the fresnMax to 0.5Hope you like it. There was quite a bit of guess work involved! You might need to brighten up your water textures using FEX as they still aren't as intense as with the default shader. I've attached the file below.Here are some screen shots:http://www.revcorp.co.uk/newshader6.jpghttp://www.revcorp.co.uk/newshader3.jpghttp://www.revcorp.co.uk/newshader8.jpghttp://www.revcorp.co.uk/new-shader-1.jpghttp://www.revcorp.co.uk/newshader7.jpgCheers,Paul

  • Author

Hi Paul,Your first post here and you already give us this nice present?Where have you been all this time my friend?? :--))Thanks a lot for your contribution, the file is great.I have to test it a little bit more because I don't know which one to keep now, both are nice!!Regards,

- PC Hardware: AMD Ryzen 9 9950X3D //  Asus ROG Crosshair X870E HERO //  2x32Gb Corsair Dominator Titanium DDR5 6000MT/s CL30 //  ASUS ROG Strix GeForce RTX 4090 OC Edition // 4Tb Corsair NVMe M.2 MP600  //  Corsair 1600W PSU
Samsung Odyssey Arc 55" curved 165 Hz monitor.
- Simulator Hardware: VIRPIL Constellation Alpha Prime + VIRPIL VPC Universal Control Panel - #3 + MOZA AY210 Force Feedback Yoke + WINWING URSA MINOR 32 Throttle & PAC Metal + WINWING SKYWALKER Metal Rudder Pedals + WINWING Airbus FCU & EFIS + WINWING Boeing 3N PAP + WINWING MCDU-32 + WINWING PFP-4 + WINWING PFP 3-N + WINWING PFP-7. 

   

 

 

Hi David,thanks for the kind words. I didn't do much to the shader. As has already been said Ingvaar did all the hard work - and Jase to get it working in SP2. Everything I did is scalable, except the moon diffuse lighting. I couldn't work out how to just reduce it, so I just removed it instead. I hated it anyway. It actually changed the water to a milky colour during the day if the moon was up too!I added two multiplication factors. One against 'basecolor.rgb' and one against 'specularFactor.x'. All you have to do is change these values (change to 1 to get back to Ingvaar's original). I chose *2 for the colour and *0.5 for the specular. You can find them near the bottom of the file. Edit it in Notepad - save - remove cached shaders - load FSX.I just tried to get a happy medium. It's never going to be perfect as its always a trade off between the amount of Fresnel reflections, standard reflections, wave effect and the underlying texture colour. I'm going to investigate further to see if I can't reduce the overall reflection intesity. I still think the cloud refletions are too intense for the sea. I know Str1ker manged to work it out in his investigations. Unfortunately since both the ocean and inland water use the same shader its going to be another tradeoff. When I get some time that is. Ought to go shopping for xmas presents really. :-(Now if only someone could work out how to get inland water to use a different shader...Paul

In Tileproxy I have recently started to use a trick: I am not allowing the alpha blend factor between land (=1) and water (=0) to go below a minimum value - say 0.2 So I am no longer getting 100% reflectivity on the water. It looks more natural this way.Would anyone know if regular land terrain is rendered with a pixel shader also? I would like to find a way to turn down the diffuse/ambient lighting quite a lot to make sunlight/shadow contrast more pronounced.Christian

Hi Christian,I would imagine that it is rendered with a pixel shader. As to which one I'm not sure. I had a quick look at the terrain.fxh but theres nothing that stands out.You might want to look in the common and general folders in the shadershlsl tree. A lot of the constants are defined in the shader files in these folders. You'd have to go through them all with a fine tooth comb to find the general ambient lighting factor. It must be there somewhere.However, if you make the sunlight/shadow contrast more pronounced, then it might look wierd since we don't have cloud shadows. i.e. a cloudy day but bright sunshine on the ground.How did you change the alpha blend factor? It would be great to be able to reduce the reflections on the water. Is is just for Tileproxy or can we do this with standard scenery?Cheers,Paul

Tileproxy can provide texture tiles (BMP) with a 4 bit alpha channel for 100% of the world surface (including water). So I have control over the alpha channel.I even managed to get solid ground show water effects (due to a programming bug). So I could get *everything* displayed with the water shader if I wanted to. ;) So basically I could also try to make the water shader display my terrain in a different way (without the fresnel term and reflections of course)BTW I find it remarkable that all shaders are available in source form (unobfuscated and in clear text). That allows us to do tweaks that otherwise would not be possible at all. The only thing one cannot do easily is get entirely new or different textures in. But existing textures (like environment maps etc) could be modified to perform different functions, like e.g. providing a lookup table for dependent reads.Christian

Awesome work everybody.My limited abilities in this field hinder things, but after digging around I see there are 'water40' files, which seem to be associated with the 'DX10' preview sim selection. After updating the water20.fxh, I finally got rid of the ridiculous 'luminous milk' night water lighting (who on earth let that one slip in?!?!) caused by the moon diffuse lighting, under DX9, but still have it with DX10, ugh.Also, could the cloud reflections not be killed completely? Sea just doesn't reflect sky objects like that at all.

Simon Holderness

Hi,I've edited the water40.fx file with the changes I made to remove the moon diffuse lighting in DX10. It should work. Its attached below.n.b. THIS IS NOT TESTED - BACKUP YOUR ORIGINAL.I don't have a DX10 gpu so I can't test it. It should work though. -----Its the water40.fx file NOT water40.fxh!------Hope it helpsAs to getting the fresnel reflections into DX10 it should be possible. The water40.fx file looks similar to the water20.fxh that was modified. However, it'd probably need someone with a bit more knowledge on shaders than me!Paul

Let me know if this works.If it does then I might put all these shader modifications in a package for the file library as alot of people have asked for the ridiculous moon glow to be removed. I can remove it for the original DX9 shader too.Maybe Str1ker can include all this in his FSWC program when he gets his PC back up and running again.I can't understand why Aces put in the moon glow in the first place. It is so over the top.Paul

Hmmm I think that something is wrong with the new Water40.fx, because when I put it in I lose all my water. (there's no colour to it). When I use the original Water40.fx it all works. (running in DX10 mode)Apart from that, great job on the Water20.fxh! It looks awesome.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.