Page 1 of 1

Depth fade on webgl not working?

PostPosted: Sat Feb 02, 2019 8:53 pm
by ekremer
Hey there,

I would like to know if depth fade is supposed to work for webgl because I can't get it to work (ASE).
In the editor viewport it is working, but not on the published build.
Could you please provide some information about it?

Thanks in advance for your help and time!

Re: Depth fade on webgl not working?

PostPosted: Tue Feb 05, 2019 11:30 am
by Amplify_Borba
Hello, thank you for getting in touch and for your support!

It should work, although when it comes to WebGL we can't guarantee that it will work in every case since you may run into version specific Browser or Unity issues, so we strongly recommend that you test your shaders on different configurations.

I've created a simple sample in Unity 2018.3.3f1 with ASE 1.6.2r4, and ran it on Chrome Version 71.0.3578.98 (Official Build) (64-bit):

Image

Have you tested on different browsers?

If you could share a simple sample with the issue present we'd be happy to look into it on our side!

Re: Depth fade on webgl not working?

PostPosted: Mon Feb 11, 2019 10:06 pm
by ekremer
Hello,

thanks for the fast reply! I can make a depthfade in a new project, but in my current one it looks more like a camera depth fade??? I am pretty sure, that it worked before (I tested it) but after building the project, it is just not working anymore. Could there be something in the project settings that I have accidentally changed with the build?

Here an image of my current scene, where it is not working (yes it is set to transparent and is in the transparent queue) it actually looks like a camera depth fade.

Thanks in advance for your help!

depthtest_01.JPG
depthtest_01.JPG (203.44 KiB) Viewed 31295 times

Re: Depth fade on webgl not working?

PostPosted: Thu Feb 14, 2019 5:16 pm
by Amplify_Borba
Please note that you need to have a light in the scene that is casting shadows so that the shadow casting pass is called, otherwise the Depth Fade node won't work.

Re: Depth fade on webgl not working?

PostPosted: Sun Feb 24, 2019 8:32 am
by ekremer
Thank you!
Yes it was the problem with no lights in the scene. I didn't know, that Unity will deactivate this when removing all lights. All shaders in the scene are unlit, so I didn't thought about this.
Thanks again!

Re: Depth fade on webgl not working?

PostPosted: Fri Mar 01, 2019 11:55 am
by Amplify_Borba
No problem, we're always happy to help!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, every bit helps and your feedback is extremely valuable to us.

Feel free to get back in touch if you have further issues or questions, thank you!