yerdock.blogg.se

Opengl es 2.0 line width glsl
Opengl es 2.0 line width glsl




opengl es 2.0 line width glsl

To draw a line in Fragment Shader, we should check that the current pixel (UV) is on the line position. if any of the adjustment pixels are white - make current pixel white, if next to nearby pixel is white - make current pixel grey).

opengl es 2.0 line width glsl

Vec2 uv = gl_FragCoord.xy / resolution.xy įloat h = 2 / c * sqrt( p * ( p - a) * ( p - b) * ( p - c))

opengl es 2.0 line width glsl

I'm far away from that level myself but this code can give you an idea: #define resolution vec2(500.0, 500.0) OpenGL ES 1.0 and 1.1 were the first portable mobile graphics APIs, defined relative to the OpenGL 1.Quite a lot is possible with fragment shaders. It remains a prevalent API today, and still is the most widely available 3D graphics API, and remains a solid choice to target the widest range of devices in the market. OpenGL ES 2.0 was the first portable mobile graphics API to expose programmable shaders in the then latest generation of graphics hardware. OpenGL ES 3.0 was another evolutionary step for OpenGL ES, notably including multiple render targets, additional texturing capabilities, uniform buffers, instancing and transform feedback. OpenGL ES 3.1 - Bringing Compute to Mobile Graphicsĭespite being only a bump in the minor revision of the API, OpenGL ES 3.1 was an enormous milestone for the API, as it added the ability to do general purpose compute in the API, bringing compute to mobile graphics. The latest in the series, OpenGL ES 3.2 added additional functionality based on the Android Extension Pack for OpenGL ES 3.1, which brought the mobile API's functionality significantly closer to it's desktop counterpart - OpenGL. OpenGL ES API Versions at a Glance OpenGL ES 3.2 - Additional OpenGL functionality






Opengl es 2.0 line width glsl