Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

OpenGL ES2: syntax error when using "layout" keyword in vertex shader(iOS)

I'm new to iPhone OpenGL ES development. When I try to specify the location of a vertex attribute using the 'layout' keyword, the compiler complains there is a syntax error. Am I using it wrong? or ...
karlbsm's user avatar
  • 427
1 vote
1 answer
166 views

GLSL hue shader producing odd results, IOS only?

I have a cross-platform LibGDX app. This particular GLSL shader code is used to shift the hue of a particular texture. It works great on Android and when debugging on Desktop, but on an iPad this is ...
yesbutmaybeno's user avatar
1 vote
1 answer
510 views

Display YUV(yuv420p) is not correct on IOS

Using (EAGLRenderingAPI api = kEAGLRenderingAPIOpenGLES2) to displaying YUV on the screen on iOS. But I got this problem, and how to deal with this problem thanks. Display YUV (size-> 3268:1838) isn'...
JNYJ's user avatar
  • 525
10 votes
0 answers
2k views

Uniform type mismatch error - OpenGL ES 3.0 shader program linked on Android 7/8/9 but failed on iOS 10/11?

I was frustrated by an error when linking OpenGL es shader 3.0 program on iOS. I have one vertex shader and one fragment shader and they are linked to generate a single program. There are shared ...
Hongkun Wang's user avatar
0 votes
1 answer
370 views

Using OpenGL extension in .fsh shader file for SKShader / iOS

In my iOS application I have a shader file TestShader.fsh with GL_EXT_shader_framebuffer_fetch extension: #extension GL_EXT_shader_framebuffer_fetch : require void main() { lowp vec4 destColor = ...
Tien Nguyen's user avatar
0 votes
1 answer
86 views

Artefact in shader for iOS

kernel vec4 custom(__sample s1, __sample s2) { if(s1.a == 0.0) return s2; if(s2.a == 0.0) return s1; vec4 res; float ...
Vahe Karamyan's user avatar
0 votes
1 answer
297 views

uniform highp mat4 not populated with values

I am passing a view-projection matrix into my OpenGLSL 2.0 shaders. In my fragment shader, the corresponding matrix is literally being set with no values. I have checked and n-checked that the ...
Dimchao's user avatar
0 votes
1 answer
242 views

GL_APPLE_clip_distance in opengl es 2.0

The documentation on GL_APPLE_clip_distance states that it is supported on both ES2.0 and ES3.0. I am trying to get it to work on devices that don't support ES3.0. The shader files have the #...
nishant's user avatar
  • 766
8 votes
1 answer
5k views

How to correctly linearize depth in OpenGL ES in iOS?

I'm trying to render a forrest scene for an iOS App with OpenGL. To make it a little bit nicer, I'd like to implement a depth effect into the scene. However I need a linearized depth value from the ...
Aseider's user avatar
  • 5,925
0 votes
2 answers
218 views

Vertex shader not compiling after moving to ES 3.0 on IOS

After moving all my shaders to ES3.0 , my compileShader is faulting on the first line. #version 300 It gives a syntax error: ERROR: 0:2: '' : syntax error: #version If it was the wrong version then ...
nishant's user avatar
  • 766
1 vote
1 answer
977 views

GLSL OpenGL How to have more precise vector variables with doubles, e.g. dvec3

So far I can make a variable vec2 which contains 2 float variables, is it possible that I can make it contain 2 double type variables? i.e for more precise numbers. So lets say I have a variable z ...
Surge's user avatar
  • 25
0 votes
2 answers
605 views

OpenGL/GLSE alpha masking

I'm implementing a paint app by using OpenGL/GLSL. There is a feature where a user draws a "mask" by using brush with a pattern image, meantime the background changes according to the brush position. ...
Oleg's user avatar
  • 123
2 votes
1 answer
518 views

WebGL: does OES_texture_float require storage as 32-bit floats? Some devices seem to store only as half floats

If a device supports OES_texture_float, then FLOAT textures should be stored as 32-bit float values, according to the spec. However, on some devices, it appears textures are stored as half floats. ...
cambecc's user avatar
  • 4,194
0 votes
1 answer
1k views

sample GL_DEPTH24_STENCIL8 depth texture error in some IOS device

I have a depth texture which is GL_DEPTH24_STENCIL8( or GL_DEPTH_COMPONENT24), and I can correctly sample this texture on some devices(iPhone5s iPad1), but fail with some invalid pixels. Following is ...
Joey.Z's user avatar
  • 4,870
1 vote
1 answer
155 views

OpenGL ES 2.0 fragment shader arithmetic incorrect on iOS

I am very new to GLSL so please excuse the basic nature of these questions.. First of all, a call to: int range[2], precision; glGetShaderPrecisionFormat(GL_FRAGMENT_SHADER, GL_HIGH_FLOAT, range, &...
jonsl's user avatar
  • 23

15 30 50 per page
1
2 3 4 5 6