Answer the question
In order to leave comments, you need to log in
How to change the precision in fragment shaders?
The problem is very strange.
Wrote a shader, tested it. It works on both the emulator and my device.
I threw a protest to a friend, but his shader does not work correctly. There are no compilation errors and no shaders binding.
Specifically, the problem is that on some Android devices, precision does not change, but remains by default.
For some reason this line of code doesn't work.
//glsl (fragment shader)
precision highp float;
#version 100
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
Answer the question
In order to leave comments, you need to log in
But no way. You should not sculpt highp in the texture shader - it slows down the performance. highp makes sense in the vertex shader.
If your code does not work without this, you are most likely doing something wrong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question