Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

is there anyway to hide sun and sun reflection in water but keep lighting

Discussion in 'General Graphics' started by melonhead, Sep 14, 2018.

  1. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    337
    i am using aquas water, i have a dark clouds skybox, the skybox hides the sun but there is still the reflection of the sun in the water, i like the lighting as it is and dont want to change it, so is there a way to remove the sun reflection in the water as it looks stupid when there is no sun in the sky to have the reflection.

    thanks for any help in advance
     
  2. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    337
    anybody?
     
  3. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    337
    does nobody have a clue how to remove the sun reflection?
     
  4. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    337
    can anyone help with this, it seems so silly that the sun is hidden by skybox but still reflected in the water
     
  5. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    3,785
    I'm not sure it's possible due to the nature of lighting (you compare normal to the light direction, specular light will automatically have a bright spot that will looked like the light source, aka the sun here).

    A potential solution would be to remove the directional light input from the shader and use a fake custom light skybox for the water (on top of the cloud skybox), but you would need to know how how to modify shader.
     
  6. DeathHillGames

    DeathHillGames

    Joined:
    Mar 4, 2018
    Posts:
    2
    It looks like the Aquas_reflection script has a "Reflect layers" option that's set to "Everything" by default. I would expect you could pick a layer for your directional light ("Sun"), and then uncheck that layer in the "Reflect layers" list.