The default qualitty settings are set as Fastest, for this reason you are not watching the shadows. Try to change it to Good or Fantastic
Well, solution: Set Default the quality setting desired with shadows turned on The shadows are ugly, is normal?
That's odd, I'm unable to search anywhere by issue id. I also tried looking at the dates of all tickets and can't find it . Could you post an exact link please?
The date of my ticket and no answers is : 05/03/2015 18:09 , i have to be patient for the next version. And you can find if are fixed in : http://issuetracker.unity3d.com/pro...&category=webgl&view=newest&unity_version=5.0
WebGL is not a final release, what we are using is a preview mode and we'll have to wait a bit more for a stable version. You can check the Patch releases if you want.
Thank you, we know it's not the final release, and of course I check the Patch releases ; just wanted to know if - right now - there is a workaround to force the shadows to use better resolution textures.
I'm having a similar problem, although it isn't identical: in WebGL shadows only show up at close range in spite of distance settings, although when they do show up they are normal soft shadows. My procedural ground detail is also blurry and seemingly threshholded like an old palette-based VGA display even though it's produced mathematically on the fly in the shader rather than being based on a texture. And the mute button doesn't work in WebGL.
Currently it is expected that you get lower quality shadows on WebGL, compared to Standalone. That's because the rendering API is basically GLES2 and we make some assumptions about the GPU. Which is not ideal because normally GLES2 is used on Mobile devices with lower specs than Desktop. This is obviously something we want to fix. For the time being you might be able to get better quality by tweaking the Shadow Settings (# Cascades, Distance, etc..) in the project QualitySettings.
I would just stay clear of shadows on WebGL. I'm having a hard enough time to optimize my own game and I don't even use shadows. Maybe try blob shadows if you really need it.
Hi I'v solved the issue with ugly shadows by modifying standard shader (that I use in my project) The thing is that, there is no 'SCREEN' shadow texture, and the ShadowMap have filtering set to point. To apply fix just duplicate standard shader into your project (it's in unity builtInShaders zip) and in UnityStandardCore.cginc add just before 'half4 fragForwardBase' Code (CSharp): #if defined (SHADOWS_SCREEN) #if defined (UNITY_NO_SCREENSPACE_SHADOWS) float4 _ShadowMapTexture_TexelSize; #define USE_LIGHT_ATTENUATION_SOFT #define LIGHT_ATTENUATION_SOFT(a) unitySampleShadowSoft(a._ShadowCoord) inline fixed unitySampleShadowSoft(unityShadowCoord4 shadowCoord) { half shadow = 0.0; // simple 3x3 filter, could be more fancy, but looks OK for (float x = -1.0; x <= 1.0; x+=1.0) { for (float y = -1.0; y <= 1.0; y+=1.0) { shadow += UNITY_SAMPLE_SHADOW(_ShadowMapTexture, (shadowCoord.xyz + float3(x * _ShadowMapTexture_TexelSize.x, y * _ShadowMapTexture_TexelSize.y, 0.0))); } } shadow/= 9.0; shadow = _LightShadowData.r + shadow * (1-_LightShadowData.r); return shadow; } #endif #endif and then in half4 fragForwardBase (VertexOutputForwardBase i) : SV_Target replace half atten = SHADOW_ATTENUATION(i); with #ifdef USE_LIGHT_ATTENUATION_SOFT half atten = LIGHT_ATTENUATION_SOFT(i); #else half atten = SHADOW_ATTENUATION(i); #endif and all should work fine (for Standard shader - for all the others similar change needs to be applied) if someone is uncommon with shaders editro here: http://mxadd.org//Unity/StandardSoftShadowsWebGL.unitypackage is provided modified Standard shader (called "Standard-SoftShadows") that does the trick (for unity 5.1.1f1 !!!) hope this helps someone
Hi, I tried your SoftShadow solution in 5.1.2f1 and I could not get the desired result. The build looked exactly the same as beforehand. Also I do not seem to get Shadow Cascades to work with WebGL, there is no difference in shadow appearance at all. I'm using the newest version of Unity with Forward Rendering since it proved to have a significantly higher framerate on our project.
what kind of light you'v put - directional ? meybe they changed something inside renderer and now other set of macros is different, hard to tell as I dont have 5.1.2f1 right now. Anyway - this should be fix by unity dev - so 'ask them'
if you are REALY determined to find a solution: - build your game - install WebGL inspector inside chrome (it's on the chrome store) - go to WebGL inspector page and read how to use it (if you are not familiar with it) - use WebGL inspector to capture frame in question and see what's going on, figure out with shader is responsible for your bad shadows, see it's code, now find that same place in unity in your HLSL code (this is little complicated, couse shaders are translated from HLSL to GLSL in the build process - but you will have overal idea where you should look) - fix the shader and be happy or ... 'ask devs'
FWIW, we have some changes to the Unity shader compiler going into Unity 5.3 which result in shadow setting no longer being tied to the graphics API being used - which will mean that soft shadows will then work in WebGL as expected.
The built WebGL will automatically degrade. Set the low, middle, high, and shadow display Settings to the same parameter, and it will display correctly.