Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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.