求教unity3D中shader显示双面的模型颜色特别亮,怎么改

2024-11-08 03:03:47
推荐回答(1个)
回答(1):

Shader "DoubleSide/Diffuse"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{
Tags { "Queue" = "Transparent" }
Material
{
Diffuse [_Color]
Ambient (1,1,1,1)
}
Pass
{

Lighting On
Cull off
Blend SrcAlpha OneMinusSrcAlpha

SetTexture [_MainTex]
{
constantColor [_Color]
Combine texture * primary DOUBLE, texture * constant
}
}
}
FallBack "Diffuse", 1
}