RFX4_Particle.shader案例
#ifdef BlendAdd
UNITY_APPLY_FOG_COLOR(i.fogCoord, res, half4(0,0,0,0));
#endif
#ifdef BlendAlpha
UNITY_APPLY_FOG(i.fogCoord, res);
#endif
#ifdef BlendMul
res = lerp(half4(1,1,1,1), res, res.a);
UNITY_APPLY_FOG_COLOR(i.fogCoord, res, half4(1,1,1,1)); // fog towards white due to our blend mode
#endif
#ifdef BlendMul2
res = lerp(half4(0.5,0.5,0.5,0.5), res, res.a);
UNITY_APPLY_FOG_COLOR(i.fogCoord, res, half4(0.5,0.5,0.5,0.5)); // fog towards gray due to our blend mode
#endif
重点是不同混合模式要对雾与颜色做不同的处理
<wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">