물체μ ν μ€μ², 컬λ¬, λΌμ΄νΈλ₯Ό νΌν©ν΄λ³΄μ.
Shader "UnityShaderTutorial/basic_blend" {
Properties {
_MainTex ("Texture to blend", 2D) = ""
}
SubShader {
Tags { "Queue" = "Transparent" }
Pass {
Material {
Diffuse (1,1,1,1)
Ambient (1,1,1,1)
}
Lighting On
SetTexture [_MainTex] {
constantColor (1, 1, 1, 1)
combine constant lerp(texture) previous
}
}
}
}fixed-style function command μμ μ 곡νλ Lightingκ³Ό SetTexture μ combineμ μ΄μ©νμ¬ ν
μ€μ²μ λΌμ΄νΈμ 컬λ¬λ₯Ό νΌν© ν μ μλ€.
constantColorλ combineμμ μ¬μ© ν μμμ μ€μ ν μ μλ€. constanceColorμ κ°μ (Red, Green, Blue, Alpha) μ΄λ€. combine μμ constantColorλ₯Ό μ¬μ©νκΈ° μν΄ constantλ₯Ό μ΄μ©νλ€.
Lightingμ κ΄ν μμΈν λ΄μ©μ basic_lightλ₯Ό μ°Έκ³ νλλ‘ νλ€.SetTexureμ κ΄ν μμΈν λ΄μ©μ basic_textureλ₯Ό μ°Έκ³ νλλ‘ νλ€.