The past week and a half have been a bit frustrating. I was attempting to make transitions into (and out of) water as seamless as possible by giving it a more volumetric feel. My goal was to be able to see above and below water within the same frame. This is harder than it sounds given our current setup, so I failed a number of times. After taking a step back for re-evaluation, I finally started making strides in the right direction.
I took some time to fix the old specular under water:
Fixed the old volume refraction bug as well:
Added one quick, but constantly postponed, feature called chromatic dispersion for refraction. It's subtle in this screenshot (didn't want to overdo it); it will get a lot more interesting when I get caustics working. Also boosted overall refraction strength (mostly on low frequency waves) while I was at it:
Earlier this week I messed around with some particle lighting for Scott's effects. Please mind the coder art. Also, the shader ended up slightly different. It features lightweight front and back (transmissive) lighting:
[embed]http://files.facepunch.com/buck2015/November/12/pplit-particle-transmission.mp4[/embed]
This one is meant to be used sparingly, as it's a more expensive than our traditionally vertex lit particles. It should help, however, deliver more interesting FX visuals in some cases.
Next Week
Step by step, taking a final stab at underwater volumetric feel and seamless transitions.