docs(examples): create vertex_displacement example

This commit is contained in:
Lloyd Lobo 2025-05-16 09:16:28 +05:30
parent e6017e5fc4
commit 0380afdf21
7 changed files with 271 additions and 0 deletions

View file

@ -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);
}