Search Unity

Can this method of faking normal maps save on GPU processing?

Discussion in 'Shaders' started by SoundStormLabs, Jun 23, 2018.

  1. SoundStormLabs

    SoundStormLabs

    Joined:
    May 6, 2017
    Posts:
    187
    Suppose that instead of a normal map, you have several transparent diffuse maps that are colored in with a particular kind of white or black over certain areas. If you were to tell Unity to make these diffuse maps more or less visible depending on the angle a character viewed them at, would that mimic the kind of depth of a normal map while saving on GPU?
     
    Last edited: Jun 23, 2018
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    You’re trading texture memory for ALU (in shader math). This indeed can be a little faster, assuming the math is the bottleneck. Modern GPUs, even mobile ones, are surprisingly fast at doing math. The reality is normal maps are really cheap on modern hardware, and blending between more than two or three textures will likely be slower, at least for a single light. The other problem would be how many textures are needed to result in something believable.