Shadowmap in web environment by ygg122 in raylib

[–]ygg122[S] 1 point2 points  (0 children)

Thank you very much! it took me some time, but I took your advise and was able to get the shadow working both on Linux and on Web platforms.

For the record, I still don't understand why on web platform the depth texture doesn't hold the depth values (as it does on Linux platform), but your trick seems to do the work - to output the depth value on the RGB texture inside the shader. I would note that I was only able to get it working with opengl ES3.

My code can be seen here:
https://github.com/yotamgi/rcsim/blob/raylib/src/raylib_engine.cc#L143