BLACKISH DEV BLOG Support
 

 

Additive Shader

It would be too much to say that I wrote this shader, but I did just assemble it from pieces of other shaders. Anyway…

Here’s an additive shader that takes a color and a texture.

Shader "Additive Texture with Color" {
 
Properties {
    _Color ("Main Color", Color) = (1,1,1,1)
    _MainTex ("Texture", 2D) = ""
}
 
SubShader {
    Tags {Queue = Transparent}
    Blend One One
    ZWrite Off
    Pass {
        SetTexture[_MainTex] {
        	constantColor [_Color]
            Combine texture * constant
        }
    } 
}
 
}
Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

One Comment

    Soren on September 20, 2021 at 19:20 | Permalink

    Continue new orbit

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>