Closed JAD3N closed 7 years ago
To be honest, I'm not able to quickly figure out what's happening. I will need more time in other to help you. Currently I'm having almost no spare time to dedicate to this. I hope the situation will improve ina couple of weeks, so I will have a look at it.
In any case, I'm not very proud about the shadows chapter. The implementation can be improved a little bit. You need to fine tune may different parameters in or to have it workinng. Besides that, there asome effects that are not addressed at all (like peter paning effect).
Thus, the current plan is to maybe write somtehing about 2D rendering and later revisit the shadows chapter.
Sorry for not being of more help (by now).
@lwjglgamedev I also have problems with shadows, don't know if it's related to this though. I have strange shadows, you can check here: https://youtu.be/sVcyaCJsTWQ
The code for the shadows chapter is far from being generic. You need to manually tweak the parameters for the light view matrix and the ortgraphic projetcion so you're scene is contained in it. From your vidoe what you are seeing is that this is not engough to cover the whole view frustrum.
Unforntaunatly, I haven't got time to quickly create a more general sample. You can manually tweak it to see if that helps or try to implement the more general approach.
Hi, I've been following your tutorial/book. I've come across an issue that I cannot solve since I don't know where to start. When I use normal mapping on textures with shadow mapping I seem to get a weird shadow under the object. The light direction is going down but when I rotate an object it gets extremely dark and then light with a box underneath.
http://prntscr.com/czcw5g
Any idea to a solution would be amazing, great series and I appreciate the work you have been doing on this.
Also feel free to look into the code I'm using (the shadows implementation isn't at all optimised it's just to get it working). https://github.com/J4D3N/Spartan-Engine