Added shaders for OpenGL ES
This commit is contained in:
parent
182a4e06dc
commit
ac7c4b342b
30 changed files with 842 additions and 0 deletions
19
resources/shaders/ES/wireframe.fs
Normal file
19
resources/shaders/ES/wireframe.fs
Normal file
|
@ -0,0 +1,19 @@
|
|||
#version 100
|
||||
#extension GL_OES_standard_derivatives : enable
|
||||
|
||||
// see for reference: https://stackoverflow.com/questions/7361582/opengl-debugging-single-pass-wireframe-rendering
|
||||
|
||||
precision highp float;
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
varying vec3 barycentric;
|
||||
|
||||
void main()
|
||||
{
|
||||
float min_dist = min(min(barycentric.x, barycentric.y), barycentric.z);
|
||||
if (min_dist > 0.5 * fwidth(min_dist))
|
||||
discard;
|
||||
|
||||
gl_FragColor = uniform_color;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue