사용자 도구

사이트 도구


language:unity:shader:레퍼런스

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

language:unity:shader:레퍼런스 [2014/05/22 17:25] – 만듦 kieunslanguage:unity:shader:레퍼런스 [2024/04/23 22:45] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
  
 +====== Unlit - Texture Colored.shader ======
 +
 +<code 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
 +      } 
 +    }
 +  }
 +}
 +</code>