人气 212

[翻译文档] T4M在Unity5中运行出错修改 [复制链接]

九艺网 2017-2-8 21:10:59

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x

​- 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):
  • [size=1em]void vert (inout appdata_full v, out Input o) {


Insert this extra line:

Code (CSharp):
  • [size=1em] 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):

  • [size=1em]Shader myShader = Shader.Find("Hidden/PlantPreview ");
  • [size=1em]Material NewPMat  = new Material (myShader);


in T4MExtendsSC.cs

and with

Code (CSharp):

  • [size=1em]Shader myShader = Shader.Find("Hidden/BrushPreview");
  • [size=1em]Material NewPMat  = new Material (myShader);


in T4MSC.cs
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|小黑屋|九艺游戏动画论坛 ( 津ICP备2022000452号-1 )

GMT+8, 2024-4-27 07:54 , Processed in 0.122400 second(s), 23 queries .

Powered by Discuz! X3.4  © 2001-2017 Discuz Team.