T4M在Unity5中运行出错修改

- Import the T4m package and accept the automatic script updating.

- Find "T4M 4 Textures.shader" (T4M/Shaders/ShaderModel2/Diffuse)

- Edit shader above adding at the end of line 17 "nolightmap" ( #pragma surface surf Lambert nolightmap)...save.

- Edit T4MSC.cs and replace line 309 with : " static public PaintHandle PaintPrev = PaintHandle.Follow_Normal_Circle;

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This fixes the error in the T4M World Projection Shader.shader

After this line:

Code (CSharp):
  1. void vert  (inout appdata_full v,  out  Input o )  {
Insert this extra line:

Code (CSharp):
  1.  UNITY_INITIALIZE_OUTPUT ( Input,o );



----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

To best edit the brush preview shader and remove the two console warnings you can :
- create the two shaders locally (es PlantPreview and BrushPreview) instead by code (currently) : line 240 (T4MExtendsSC.cs) and line about 1400 (T4MSC.cs).

es replace the line :

Material NewPmat = new material ("shader....
with

Code (CSharp):
  1. Shader myShader  =  Shader. Find ( "Hidden/PlantPreview " );
  2. Material NewPMat   =  new  Material  (myShader );
in T4MExtendsSC.cs

and with

Code (CSharp):
  1. Shader myShader  =  Shader. Find ( "Hidden/BrushPreview" );
  2. Material NewPMat   =  new  Material  (myShader );
in T4MSC.cs

你可能感兴趣的:(T4M在Unity5中运行出错修改)