Shadow rendering distance HTML5
I am having trouble with shadows and HTML5 builds. The objects in my game ended up being of very large scale (6m X 6m). Which in turn has made my camera distance to the subjects rather large (120m). Everything works fine in the editor or for regular Mac/Windows/Linux builds. When I compile to HTML5 however the shadows are not rendering because my camera is too far. If I move the camera closer to the subjects the shadows work. I am way too far into this project to rescale everything. In fact this is a project for school and we are publishing in one week. We need to publish in HTML5.
I changed shadow distance to 300 in the projects quality settings and it had no effect. The game only has one light source (directional light). I can't see any settings in the light source which might help. I can't figure out why there is a difference between editor / mac / win / linux and html 5 builds. Shadows are rendered in each just at different distances from the camera. Since distances are relative I can't see why they would be hard coded for HTML5.
Any ideas would be greatly appreciated. I am getting close to release date, and shadows make a huge difference in my game.
Thanks in advance.
Answer by 2-Zons · Dec 16, 2015 at 05:37 PM
I figured it out. Seems that WebGL builds have a different default quality setting than what the editor or Mac/Win/Linux builds use. To fix this problem you can change the shadow distance for the quality setting that WebGL uses or change the default quality setting for WebGL. Even with the same quality settings WebGL doesn't look the same as the editor or Windows compiles but at least I have shadows now.