by pwheeler » Mon Dec 31, 2007 10:57 am
Hi guys,
thought I'd register here as I think we're on the right course for a massive improvement in look of the water.
Firstly, I modified a version for SP2 that was done by Jase over on AVSIM. He got Ingvaars original shader mod working in SP2. I don't know if he did anything differently to you Nick to get it working in SP2.
All I did was add muliplication factors against the texture colour and the specular lighting, and also remove the entry that created that annoying moon glow. The first two are scalable so hopefully Str1ker you can add them into FSWC. Although I removed the moon glow line, it is probably scalable too by adding a multiplication factor to it rather than delete it.
There seems to be seven components to the water - base texture colour; sun diffuse lighting; moon diffuse lighting; sun specular lighting; moon specular lighting; reflections (sky (low), clouds (mid), terrain (high), autogen (max)); bump mapping.
I think these are all controlled within the shaders so theoretically they are all modifiable.
I have a few more things that I have been trying to work on. Any help would be appreciated:
1. Someone on AVSIM asked if I could remove the moon glow from DX10. This file is quite different to the DX9 file and apparently just removing the line I removed in DX9 didn't work. I havn't tried to mulitply the line instead as I don't have a DX10 GPU to test it on. Can someone with DX10 try changing this line in the water40.fx (not fxh) and add the bit in red to see if it works?:
Color = float4(lerp(Color.xyz + (g_vSunDirectional * specularFactor.x) + (0.3 * (specularFactor.y + 0.1 * saturate(dot(g_vSunVectorWorld_Moon,vSurfaceNorm)))).xxx, baseColor.xyz, fAlpha.xxxx),fAlpha);
There's alot of guess work involved as I really don't have a clue what I'm doing ;)
2. The modification I made to the specular lighting reduces their intensity. This is not quite what I wanted to achieve. What I really wanted was to reduce the size of the specular reflections. With my mod the specular glints are not pure white, I essentially just reduced their opacity. I want them to be pure white just not such a wide area. Any ideas?
3. I've been trying to work out how to reduce the intensity of the reflections. It seems to be the envColor.rgb variable that draws the reflections. However it also seems to draw the sun diffuse lighting too and multipliying by ,say 0.3, tends to make the water too dark, although it does reduce the reflections. I'm sure that there is a line somewhere else in the shader which can be muliplied to reduce reflections without reducing the diffuse lighting.
4. What I would really like to accomplish is control over what is reflected at the different water 2x levels. i.e. have the terrain rather than the clouds reflected at water 2x mid. This should help with performance and I'd rather see the terrain reflected than the clouds. Not sure if this is controlled by the shaders. Any ideas?
5. Alot of people have noted the star reflections are way out of proportion. I imagine they are reflected in the same way as the sun, moon and sky. Any one have any ideas how we can remove them? My guess is we can't without removing the sun, moon and sky reflections too, unless they are reflected using an env map rather than what is actually in the sky.
I know the FEX guys are looking into some of these issues with regards to implimenting them in FEX, so maybe they'll come up with something.
Anyway, sorry for the long post.
Happy new year!!!
Paul
