Search Unity

Specular Water

Discussion in 'Shaders' started by Squideey, Oct 22, 2010.

  1. Squideey

    Squideey

    Joined:
    Aug 26, 2010
    Posts:
    24
    Easy question: how would I add specular highlights to the standard daylight water material?
     
  2. ole

    ole

    Unity programmer

    Joined:
    Sep 30, 2010
    Posts:
    56
    we are working on that and will release it very soon.

    if you want to do it yourself, you can hack the water CG shader with a calculation for that specular component for one specific light transform (i guess the sun), based on the water bump normal, viewing angle and light direction.
     
  3. Rychu

    Rychu

    Joined:
    Dec 1, 2009
    Posts:
    29
    It's simple task.

    Shader and sreen are attached. I guess you'll need to tweak bumpmap a bit, cause standard one it doesn't look very nice.

    Note, that you can't use that 'pond' from standard assets as my shader requires mesh normals and tangents as well. But it works fine with plane.

    Currently it's not compatible with deferred lighting.
     

    Attached Files:

    Last edited: Oct 23, 2010
  4. liverolA

    liverolA

    Joined:
    Feb 10, 2009
    Posts:
    347
    nice one,would you please upload the res file too?a unitypackage is better