0
Завершен

How can I make a particle add(soft) shader?

wavebbs 8 лет назад обновлен 8 лет назад 3

How can I add this code in the shader ?

Code: Select all

#ifdef SOFTPARTICLES_ON
float sceneZ = LinearEyeDepth (SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)));
float partZ = i.projPos.z;
float fade = saturate (_InvFade * (sceneZ-partZ));
i.color.a *= fade;
#endif



I want add soft particle code on my shader like unity3d shader "Particles/Additive"

Ответ

Ответ
Завершен

Multiply the color with the depth blend node. The input of the depth blend node is the fade distance, which defaults to 1 meter

Ответ
Завершен

Multiply the color with the depth blend node. The input of the depth blend node is the fade distance, which defaults to 1 meter

Thank you, I found it,but it dosen't has macro "SOFTPARTICLES_ON" ,so I can't control it by Unity3d->qualitysetting->soft particles button . How could I fixed it ? :)

Thank you, I found it,but it dosen't has macro "SOFTPARTICLES_ON" ,so I can't control it by Unity3d->qualitysetting->soft particles button . How could I fixed it ? :)

Сервис поддержки клиентов работает на платформе UserEcho