treesummaryrefslogcommitdiff
path: root/shaders/frag_shadowmap.glsl
blob: 38a01b607bc6ac2e74894e68d1caa516074a8f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#version 330 core

in vec3 FragPos;
in vec3 LocalPos;

out vec4 FragColor;

uniform vec3 lightPos;

void main()
{
  // calculate distance in world coordinates
  float lightDist = length(lightPos - FragPos);
  float c1 = lightDist;
  float c2 = lightDist;
  float c3 = lightDist;
  FragColor = vec4(c1, c2, c3, 1);
}