Closed alyfreym closed 5 years ago
The fragment shaders you write use the OpenGL Shading Language, which has a limited number of built-in functions. round() is unfortunately not one of those. For OpenGL ES 2.0 (as used on iOS), you can take a look at the quick reference card here:
https://www.khronos.org/opengles/sdk/docs/reference_cards/OpenGL-ES-2_0-Reference-card.pdf
and see the available built-in shader functions on the last page.
I started writing my shader when I use the round () function, I get an error - Fragment shader compile log: ERROR: 0:1: Invalid call of undeclared identifier 'round'. I understand that this error does not apply to GPUImage. Well, can somebody tell me why the mathematical function is not available?