Search Unity

flow map + parallax map

Discussion in 'Shaders' started by mouurusai, Nov 12, 2019.

  1. mouurusai

    mouurusai

    Joined:
    Dec 2, 2011
    Posts:
    350
    Hello! Please give me any advice about how to combine effects: "flow map" and "parallax map"?
    Thank you in advance!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Add the shader code to do both? I'm not sure I understand the question. Also what do you mean by "parallax map", that's a term that covers a lot of different techniques.

    If you're talking about parallax offset mapping, then it's fairly straight forward. Calculate the flow map's UVs, sample the heightmap twice and combine, then use that height to offset the flow map UVs to sample the color value.

    If you're talking about parallax occlusion mapping, or relief mapping, then you need to calculate the flow map UVs for every raymarched sample to calculate the appropriate height map for that position.
     
    mouurusai likes this.
  3. mouurusai

    mouurusai

    Joined:
    Dec 2, 2011
    Posts:
    350
    Its works great, thanks!
     
    Last edited: Nov 12, 2019