docs(examples): create vertex_displacement example
This commit is contained in:
parent
e6017e5fc4
commit
0380afdf21
7 changed files with 271 additions and 0 deletions
|
@ -0,0 +1,18 @@
|
|||
#version 100
|
||||
|
||||
precision mediump float;
|
||||
|
||||
// Input vertex attributes (from fragment shader)
|
||||
varying vec2 fragTexCoord;
|
||||
varying float height;
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 darkblue = vec4(0.0, 0.13, 0.18, 1.0);
|
||||
vec4 lightblue = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
// Interpolate between two colors based on height
|
||||
vec4 finalColor = mix(darkblue, lightblue, height);
|
||||
|
||||
gl_FragColor = finalColor;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue