mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
30 lines
441 B
GLSL
30 lines
441 B
GLSL
#version 330 core
|
|
|
|
#include <globals.glsl>
|
|
#include <srgb.glsl>
|
|
#include <lod.glsl>
|
|
|
|
in vec2 v_pos;
|
|
|
|
layout (std140)
|
|
uniform u_locals {
|
|
vec4 nul;
|
|
};
|
|
|
|
out vec3 f_pos;
|
|
out float f_light;
|
|
|
|
void main() {
|
|
f_pos = lod_pos(v_pos);
|
|
|
|
f_pos.z -= 25.0 / pow(distance(focus_pos.xy, f_pos.xy) / view_distance.x, 20.0);
|
|
|
|
f_light = 1.0;
|
|
|
|
gl_Position =
|
|
proj_mat *
|
|
view_mat *
|
|
vec4(f_pos, 1);
|
|
gl_Position.z = 1.0 / (1.0 - gl_Position.z - 10.0);
|
|
}
|