It is often suggested that DX10 water is lighter than DX9, so I thought I would look at why.
First DX9 – bloom off water 2.low Shader 2 Original Shaders
I think its clearly true that there is a difference, ignore the white light on the water in DX9 that’s a separate property it’s the colour tone we are interested in here.
I also tried Bojote’s Shader 3 Mod which seems even deeper blue again
So what is going on in the water shader?
In both DX9 and DX10 the colour appears to be arrived at by interpolating between the Water Colour from a water texture with the Environment which is another texture this is based on a factor which refers to Fresnel values. It also adds the specular component this is based off the transparency (alpha channel) of the water colour. There are some tweaks too. For DX10 it adds in white caps and also fog. For DX9 the fog is external. There are also some bump textures which have an influence.
Anyway the approach that I took was to break down the process into its various stages and compare the various parts at each stage
DX9 Shader3 mod w/o fog
So curiously the environment is darker in DX10
Lets look at the Water colour. From this point on I used the Shader Mod 3 shaders because I could then avoid the fogging which gets applied outside the shader in Shader 2.0. This made it easier to compare like for like.
DX9 Shader 3
Slightly lighter in tone?
DX10 with altered Fresnel factors for blend to match DX9
DX10 After second specular blend (with altered fresnels)
So that’s where the major difference occurs happens – its either the specular values or their blend with the land which is based on the alpha of the base water colour. Unless the land blend is broken it must be the specular factor.
So lets remove the land blend and look at just the specular element.
DX10 100% specular component
DX9 100% specular
Now the DX10 specular term
Color = float4(lerp(Color.xyz + (g_vSunDirectional * specularFactor.x) + (0.3 * (specularFactor.y + saturate(dot(g_vSunVectorWorld_Moon,vSurfaceNorm)))).xxx, baseColor.xyz, fAlpha.xxxx),fAlpha);
Has a multiplier of 0.3 which is 0.1 in DX (so lets reduce it!
DX10 with reduced specular factor (showing just the specular term)
Which is getting a lot closer
Ok so now Final effect
And the original DX9 shot
And our adjusted DX10 with altered fresnels
I hope that you will agree its much closer. In DX9 the single bump map leads to more reflections of the sun which is I think the reason for the differences in the bottom left hand portion – there are specular highlights in DX10 as well but they are out of shot to the left.