• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by 2-Zons · Dec 11, 2015 at 04:29 PM · camerarenderingwebglshadowshtml5

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.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image 2-Zons · Dec 11, 2015 at 04:38 PM 0
Share

I have upgraded to 5.3 and it still behaves the same.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

42 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Shadow quality at high distances 1 Answer

Using multiple cameras for different render distances causes weird shadow effect? 0 Answers

Disabling a specific light for only a specific camera in Universal Render Pipeline (URP) 0 Answers

Invisible object that still receives shadows 0 Answers

Scene view render path seems to have become very small? 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges