Search Unity

Question Depth Difference between OpenGL and GL ES

Discussion in 'Shaders' started by joshuacwilde, Aug 4, 2022.

  1. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    I have some custom shadow code that I have running correctly on OpenGL (Windows), but not on GL ES (Android). I am sure it is due to how I am calculating the depth and comparing to the texture, but I am not sure exactly what the issue is.

    What differences, if any, there are between how depth is calculated, and stored between OpenGL and GL ES?
     
    Last edited: Aug 4, 2022
  2. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    731
    nvm, turns out it was because I was using SHADER_API_GLES instead of SHADER_API_GLES3 in the shader...

    Also just learned you can use GL ES in the Editor, which is awesome and crazy helpful!
     
    Last edited: Aug 4, 2022