Search Unity

Feature Request Split "Sample Cubemap" into "Sample Reflection" and "Sample Cubemap"

Discussion in 'Shader Graph' started by khalvr, Nov 19, 2019.

  1. khalvr

    khalvr

    Joined:
    Sep 12, 2017
    Posts:
    53
    I noticed that the "Sample Cubemap" node takes both a normal and a view direction, and that it uses reflect() behind the scenes to get a reflection sample. I have to say i really, REALLY, disagree with this because it limits cubemaps to reflections only, when they can be used for so much more. For instance, i once made a set of planet shaders which used the vertex normal to sample from a cubemap in order to get a nice texture projection. I know that it's possible to pipe in the negative normal into the view direction, but this adds a bunch of extra unnecessary math to the shader for no reason. "Sample Cubemap" should do just what it says on the tin - sample a cubemap using a 3d vector. If you absolutely want to streamline the process of sampling a reflection, just add a "Sample Reflection" node with the current functionality.
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
  3. sulai

    sulai

    Joined:
    Jul 5, 2016
    Posts:
    1
    Totally agree
     
  4. disuperguy

    disuperguy

    Joined:
    Nov 6, 2019
    Posts:
    8
    and God said it was good