话不多说,将以下shader赋给材质贴上贴图即可。
Shader "HQY/Shader2" //自己改名
{
Properties
{
_Diffuse ("Diffuse", Color) = (1,1,1,1)
_MainTex ("MainTex", 2D) = "white" {}
_Specular("Specular", Color) = (1,1,1,1)
_Gloss("Gloss", Range(8,256)) = 20
_PixelSize ("PixelSize", Range(1, 100)) = 1
}
SubShader
{
Tags { "RenderType"="Opaque" "LightMode"="ForwardBase"}
LOD 200
Pass{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Lighting.cginc"
fixed4 _Diffuse;
sampler2D _MainTex;
sampler2D _NewTex;
fixed4 _Specular;
float _Gloss;
struct appdata {
float4 vertex : POSITION;
float3 normal : NORMAL;