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,16 @@
|
|||
#version 330
|
||||
|
||||
// Input fragment attributes (from fragment shader)
|
||||
in vec2 fragTexCoord;
|
||||
in float height;
|
||||
|
||||
// Output fragment color
|
||||
out vec4 finalColor;
|
||||
|
||||
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
|
||||
finalColor = mix(darkblue, lightblue, height);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue