Search Unity

Differentiate between WebGL and Mobile

Discussion in 'Shaders' started by Justafin, Mar 9, 2016.

  1. Justafin

    Justafin

    Joined:
    Aug 6, 2012
    Posts:
    30
    Does anyone know of a way to differentiate between WebGL and mobile when writing shaders since both use the OpenGL ES 2.0 rendering platform? I know 5.3 uses UNITY_53_SPECIFIC_TARGET_WEBGL but I'm guessing that is just temporary.

    Thanks
     
  2. Justafin

    Justafin

    Joined:
    Aug 6, 2012
    Posts:
    30
    Nothing?
     
  3. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    "SHADER_API_MOBILE" might work, but I would go through all the "platform difference helpers" and see if you can find what you need for any specific issues there. It's better to code around specific features than platforms anyway.