Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Merging fragment shader into standard shader

Discussion in 'Shaders' started by jackmott, Dec 10, 2015.

  1. jackmott

    jackmott

    Joined:
    Jan 5, 2014
    Posts:
    167
    I've got a fragment shader that does beautiful perlin noise.

    I'd like to combine with the standard shader so that it can be lit, have normal maps added, etc.

    What is the high level approach here?
    I've tried just dumping the it in there as the first pass, that didn't work, see:http://pastebin.com/D7uF6UfK
     
  2. jackmott

    jackmott

    Joined:
    Jan 5, 2014
    Posts:
    167
    Hmm, moving it to the bottom of the passes, makes it 'work' except it totally overwrites all the lighting and texture. Will it blend?
     
  3. jackmott

    jackmott

    Joined:
    Jan 5, 2014
    Posts:
    167
    Aha, got it! Blend One One!
     
    Flailer likes this.