2

I'm writing 3d game with libgdx, and want to add fake 2d shadows on bottom of models. Now I'm using 2 planes with shadow texture and draw them a bit upper then floor planes. Everything is going ok, but when 2 shadow planes overlaps, there is a weird graphical artifact, because shadow planes have same Y(vertical) coordinate. What i need to do to avoid this? Maybe some texture on floor plane projection? If so - how?

example image http://itmages.ru/image/view/1497735/17ea1cdd

UPDATED: So i found another solution. You can use circle mesh for shadows instead of quad and don't let them overlap.

enter image description here

4

1 回答 1

4

一个肮脏但可行的解决方案只是给它们一个不同的 Y 位置。一个非常非常非常小的差异,足以解决您的问题但不引人注意。

于 2014-02-14T07:06:15.100 回答