사용자 도구

사이트 도구


language:unity:shader:레퍼런스

Unlit - Texture Colored.shader

// Unlit color shader. Very simple textured and colored shader.
// - no lighting
// - no lightmap support
// - per-material color
// from : http://shattereddeveloper.blogspot.jp/2012/11/creating-colored-unlit-texture-shader.html
// Change this string to move shader to new location
Shader "Unlit/Texture Colored" {
  Properties {
    // Adds Color field we can modify
    _Color ("Main Color", Color) = (1, 1, 1, 1)        
    _MainTex ("Base (RGB)", 2D) = "white" {}
  }
 
  SubShader {
    Tags { "RenderType"="Opaque" }
    LOD 100
 
    Pass {
      Lighting Off
 
      SetTexture [_MainTex] { 
        // Sets our color as the 'constant' variable
        constantColor [_Color]
 
        // Multiplies color (in constant) with texture
        combine constant * texture
      } 
    }
  }
}
language/unity/shader/레퍼런스.txt · 마지막으로 수정됨: 2024/04/23 22:45 저자 127.0.0.1