/*
 * fragment shader for heightmap rendering
 *
 * calculates the pixel color by using the given detail textures
 * and the information in the heightmap-texture, which texture has which opacity
 *
 * written by:
 * christian moellinger <ch.moellinger@gmail.com>
 * 01/2011
 */

#version 330 core
precision highp float;

uniform sampler2D detailTexture1;
uniform sampler2D detailTexture2;
uniform sampler2D detailTexture1_normal;
uniform sampler2D detailTexture1_bump;
uniform sampler2D detailTexture2_normal;
uniform sampler2D detailTexture2_bump;
uniform sampler2D baseTexture;
uniform sampler2D heightmap;
uniform sampler2D shadowmap;

uniform mat4 Camera_ProjectionMatrix;
uniform mat4 Camera_TransformMatrix;
uniform mat4 Camera_TempTransformMatrix;
uniform mat4 Model_TransformMatrix;
uniform mat3 NormalMatrix;

out vec4 FragColor;
in vec3 my_ObjPosition;
in vec4 finalPosition;

void main()
{
    FragColor = vec4(finalPosition.z / finalPosition.w, my_ObjPosition.y, my_ObjPosition.z, 1.0);
}

