Search Unity

Question What was the reason you are forced to use a T2 on the POM node?

Discussion in 'Shader Graph' started by TheWhispers, Dec 17, 2020.

  1. TheWhispers

    TheWhispers

    Joined:
    Mar 10, 2020
    Posts:
    19
    I have an animated texture I made in shadergraph using a bunch of noise and I wanted to apply POM to this because doing a vertex displacement on a high res mesh on a texture that'll only be viewed from far away sounds like a great way to waste resources. Is there anyway to convert my heightmap into a T2 for shadergraph? using 8.3.1.

    I just don't understand why we can't use the heightmap generated inside shadergraph from the noise for POM heightmap input.
     
  2. Oxeren

    Oxeren

    Joined:
    Aug 14, 2013
    Posts:
    121
    Noise nodes do not calculate a whole heightmap, they only calculate a noise value for the particular pixel being rendered. Parallax Occlusion Mapping needs to be able to access different parts of the heighmap, so the value produced by noise is not helpful for it. It is possible to create POM based on noise, but it would require writing a custom function that samples noise as it needs.
    I guess it is also possible animate the noise in some external software, bake animation frames into a flipbook atlas, and use Flipbook UV node combined with Time to animate the UVs that are fed into the POM node.
    It also should be possible to use a separate shader that you use to render noise into a RenderTexture, and then feed it into the POM node.
     
    Last edited: Dec 18, 2020
  3. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    197

    well damn thats stupid.

    so any update on getting animated/modulated parallax maps in shader graph? what is this T2 crap