C#/문제해결

0817 polybrush안됨

버스창문 2022. 8. 17. 13:27

 

it doesn't look like any of the materials on this object support vertex colors

 

아무리 검색해봤자 쓰잘때기없는것만 하루종일 볼수있다.

그리고 놀랍게도 저 에러는 색칠 안되는거랑 상관이 없다.

 

Shader "Custom/axe"
{
    Properties
    {
        _MainTex ("Albedo (RGB)", 2D) = "white" {}
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }

        CGPROGRAM
        #pragma surface surf Standard
        #pragma target 3.0

        sampler2D _MainTex;

        struct Input
        {
            float2 uv_MainTex;
            float4 color:COLOR;
        };
        void surf (Input IN, inout SurfaceOutputStandard o)
        {
            fixed4 c = tex2D (_MainTex, IN.uv_MainTex);
            o.Albedo = IN.color.rgb;
            o.Alpha = c.a;
        }
        ENDCG
    }
    FallBack "Diffuse"
}

 

 

 

Input에 float4 color:COLOR; 를 넣으면 해결된다.

'C# > 문제해결' 카테고리의 다른 글

0821 등급관리 프로그램  (1) 2022.08.21
0818 맵만들기  (0) 2022.08.18
0816 유니티에 pmx 가져오기  (0) 2022.08.16
0729 별 순서대로 나오게하기  (0) 2022.07.29
0727 UI image의 enable  (0) 2022.07.27