mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 17:55:36 +02:00
20 lines
555 B
GLSL
20 lines
555 B
GLSL
#version 120
|
|
|
|
//
|
|
// perlin_modulate.vert
|
|
// vertex shader
|
|
//
|
|
// Created by Andrzej Kapolka on 5/15/13.
|
|
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
|
//
|
|
|
|
// the position in model space
|
|
varying vec3 position;
|
|
|
|
void main(void) {
|
|
position = gl_Vertex.xyz;
|
|
vec4 normal = normalize(gl_ModelViewMatrix * vec4(gl_Normal, 0.0));
|
|
gl_FrontColor = gl_Color * (gl_LightModel.ambient + gl_LightSource[0].ambient +
|
|
gl_LightSource[0].diffuse * max(0.0, dot(normal, gl_LightSource[0].position)));
|
|
gl_Position = ftransform();
|
|
}
|