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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Convert to surface shader

Discussion in 'General Graphics' started by Nake47, Aug 7, 2015.

  1. Nake47

    Nake47

    Joined:
    May 4, 2014
    Posts:
    6
    Hi all!Please help me convert this shader into surface shader.
    Shader "AlphaTexturing" {
    Properties {
    _AO("АО",2D)="white"{}
    _MainTex ("Main Texture", 2D) = "white" {}
    _Mask ("Mask Texture", 2D) = "white" {}
    _MainTex2 ("Main Texture", 2D) = "white" {}
    _Mask2 ("Mask Texture", 2D) = "white" {}
    _Color("",Color)=(0,0,0,0)
    }
    SubShader {

    Blend SrcAlpha OneMinusSrcAlpha
    Lighting On

    Pass{
    SetTexture [_AO] {combine texture*texture,previous}
    }
    Pass
    {


    SetTexture [_Mask] {combine texture}

    SetTexture [_MainTex] {combine texture, previous}

    }
    Pass
    {

    SetTexture [_Mask2] {combine texture}

    SetTexture [_MainTex2] {combine texture, previous}


    }

    }


    }
     
  2. Nake47

    Nake47

    Joined:
    May 4, 2014
    Posts:
    6
    Oooh my gooodd