Open lumieru opened 1 year ago
可根据提示自行修改。改动原则:
例如FariyGUI-Image的改动:
Properties
{
// ....
// 省略原本就声明的属性
_ClipBox ("ClipBox", Vector) = (-2, -2, 0, 0)
_ClipSoftness ("ClipSoftness", Vector) = (0, 0, 0, 0)
}
SubShader
{
// 下面将CLIPPED和SOFTCLIPPED的宏定义去除,直接声明这两个字段,vert函数内的宏定义保留
CBUFFER_START(UnityPerMaterial)
// #ifdef CLIPPED
// float4 _ClipBox = float4(-2, -2, 0, 0);
// #endif
// #ifdef SOFT_CLIPPED
float4 _ClipBox = float4(-2, -2, 0, 0);
float4 _ClipSoftness = float4(0, 0, 0, 0);
// #endif
CBUFFER_END
}
我们不支持SPR Batcher的,开启了会导致渲染错误。
我们不支持SPR Batcher的,开启了会导致渲染错误。
哦哦 好的
有好几个shader显示不是SRP Batcher compatible的,具体如下: FairyGUI-TMP: Material property is found in another cbuffer than "UnityPerMaterial" (_FaceUVSpeedX) FairyGUI-Image: UnityPerMaterial var is not declared in shader property section (_ClipBox) FairyGUI-Text: UnityPerMaterial var is not declared in shader property section(_ClipBox)