Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Will it be good way to combine 2 normalmaps?

Discussion in 'Shaders' started by DimitriX89, Sep 9, 2023.

  1. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    550
    (For situations when I cannot pre- combine them in 2d editor (procedural content)). So, I thought about applying effects of both normals consecutively. 1)Unpack the first map with standard algorithm 2)Align tangent and binormal to new normal vector using cross products 3)Custom unpack the second map (get it to -1/1 space, scale new coordinate vectors by xyz components, sum vectors). Will it be unacceptably slow? Or wrong algorithm completely?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,221
    DimitriX89 likes this.
  3. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    550
    I'll go study it, thank you. I think I even seen some your articles couple of years ago when I tried to make triplanar shader for Blender. Copied the whiteout blend formula mindlessly and it worked.