Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] shader error on Android(Oculus Quest) build
#4
(07-04-2020, 02:11 PM)Snail921 Wrote: Thank you for the advice.
Indeed, the package was new from 5.2 and not updated from any older version.

The line #21 was correct and by adding noshadowmask removed particle shader compile error while causing other compile error from another shader not from your package.
I have no knowledge about shader programming but these behavior of Unity looks very strange.
By checking GL ES3.1, the all issues are gone. I did this without any clear idea but anyway ES3.1 and noshadowmask pragima did work well indeed.

Do you have any idea what is going on about this?

Unity's shader macros are a huge mess that conditionally compile out certain chunks depending on many factors (platform used, pipeline used, lightning settings, graphics API used, and a few others). Given that they must support many different capabilities in many different platforms/environments, this is not surprising (I'm not blaming them).

Our debug particle shader uses their lightning macros to get light attenuation values. It very well might be that these macros are compiled out if certain specific features are not available in  a given API, so the _ShadowCoord variable (which is used for sampling the shadow map to get light attenuation) might just disappear when using certain settings.

I was under the idea that light maps were the only thing that determined the availability of light attenuation macros, but this might have changed in recent versions  Indeciso . I will check it out.
Reply


Messages In This Thread
RE: shader error on Android(Oculus Quest) build - by josemendez - 07-04-2020, 02:36 PM