ColinLeung-NiloCat / UnityURPUnlitScreenSpaceDecalShader

Unity unlit screen space decal shader for URP. Just create a new material using this shader, then assign it to a new unity cube GameObject = DONE, now you have unlit decal working in URP
MIT License
1.26k stars 129 forks source link

Results giving weird look after using your shader. #30

Open bodduavinash opened 3 years ago

bodduavinash commented 3 years ago

Results giving weird look after using your shader.

I have followed the instructions given in readme file, still giving weird looks.

Please see the below screenshot, for better understanding.

image

Kindly help me solve this issue.

Appreciate if anyone faced and help me for this issue.

ColinLeung-NiloCat commented 3 years ago

turn on _ProjectionAngleDiscardEnable

bodduavinash commented 3 years ago

@ColinLeung-NiloCat

Thank you for the response,

I've turned on _ProjectionAngleDiscardEnable, below is the result after setting threshold value to 0.02, but the bottom is not projecting right.

image

image

My expectation result should be something below.

image

Is there any other settings do I need to apply? Kindly help me solve this issue.

ColinLeung-NiloCat commented 3 years ago

rotate the decal gameobject a bit

bodduavinash commented 3 years ago

@ColinLeung-NiloCat Yes, I have tried X rotation about 20 units, then it started showing better results. Thank you for the quick response and help.

image

I am implementing FPS shooter game.

If I shoot straight wall or ground alone it works well, but if I shoot corner of both straight wall or ground, then how can I detect that bullet is hitting at corner? in other words, when should I rotate if the bullet is hitting the corner? Is there any workaround for this? Kindly help me to solve this issue.

Thanks, Avinash.