unity怎么添加高光阴影
1、Shader "Toon/Basic Outline" {Properties {_Color ("Main Color", Color) = (.5,.5,.5,1)_OutlineColor ("Outline Color", Color) = (0,1,0,1)_Outline ("Outline width", Range (0.005, 0.01)) = .001_MainTex ("Texture", 2D) = "white" {}_BumpMap ("Bumpmap", 2D) = "bump" {} }

3、uniform float _Outline;uniform float4 _OutlineColor;v2f vert(appdata v) {v2f o;o.pos = mul(UNITY_MATRIX_MVP, v.vertex);float3 norm= mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal);float2 offset = TransformViewToProjection(norm.xy);

5、 SubShader {Tags { "RenderType"="Opaque" }UsePass "Toon/Basic/BASE"Pass {Name "OUTLINE"Tags { "LightMode" = "Always" }Cull FrontZWrite OnColorMask RGBBlend SrcAlpha OneMinusSrcAlphaCGPROGRAM#pragma vertex vert#pragma exclude_renderers shaderonlyENDCGSetTexture [_MainTex] { combine primary }}}
