mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 02:27:09 +02:00
24 lines
640 B
GLSL
24 lines
640 B
GLSL
#version 120
|
|
|
|
//
|
|
// metavoxel_heightfield_base.frag
|
|
// fragment shader
|
|
//
|
|
// Created by Andrzej Kapolka on 8/20/14.
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
// the diffuse texture
|
|
uniform sampler2D diffuseMap;
|
|
|
|
// the interpolated normal
|
|
varying vec4 normal;
|
|
|
|
void main(void) {
|
|
// compute the base color based on OpenGL lighting model
|
|
gl_FragData[0] = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].st);
|
|
gl_FragData[1] = normalize(normal) * 0.5 + vec4(0.5, 0.5, 0.5, 1.0);
|
|
}
|