Skip to content

Latest commit

Β 

History

History
37 lines (29 loc) Β· 1.22 KB

File metadata and controls

37 lines (29 loc) Β· 1.22 KB

Abstract

물체에 ν…μŠ€μ²˜, 컬러, 라이트λ₯Ό ν˜Όν•©ν•΄λ³΄μž.

Shader

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
            }
        }
    }
}

Description

fixed-style function command μ—μ„œ μ œκ³΅ν•˜λŠ” Lightingκ³Ό SetTexture 의 combine을 μ΄μš©ν•˜μ—¬ ν…μŠ€μ²˜μ— λΌμ΄νŠΈμ™€ 컬러λ₯Ό ν˜Όν•© ν•  수 μžˆλ‹€.

constantColorλŠ” combineμ—μ„œ μ‚¬μš© ν•  색상을 μ„€μ • ν•  수 μžˆλ‹€. constanceColor의 값은 (Red, Green, Blue, Alpha) 이닀. combine μ—μ„œ constantColorλ₯Ό μ‚¬μš©ν•˜κΈ° μœ„ν•΄ constantλ₯Ό μ΄μš©ν•œλ‹€.

  • Lighting에 κ΄€ν•œ μžμ„Έν•œ λ‚΄μš©μ€ basic_lightλ₯Ό μ°Έκ³ ν•˜λ„λ‘ ν•œλ‹€.
  • SetTexure에 κ΄€ν•œ μžμ„Έν•œ λ‚΄μš©μ€ basic_textureλ₯Ό μ°Έκ³ ν•˜λ„λ‘ ν•œλ‹€.