1
0
Fork 0
fgdata/Shaders/HDR/stars.vert
Fernando García Liñán 7b0211031a HDR: Improve stars rendering
Previously we did not take into account the atmospheric transmittance
to render the stars, leading to stars being incorrectly rendered in
low visibility conditions.

Also place the stars in the correct render bin.
2024-01-07 16:18:55 +01:00

19 lines
400 B
GLSL

#version 330 core
layout(location = 0) in vec4 pos;
layout(location = 2) in vec4 vertex_color;
out VS_OUT {
vec4 color;
vec3 view_vector;
} vs_out;
uniform mat4 osg_ModelViewMatrix;
uniform mat4 osg_ModelViewProjectionMatrix;
void main()
{
gl_Position = osg_ModelViewProjectionMatrix * pos;
vs_out.color = vertex_color;
vs_out.view_vector = (osg_ModelViewMatrix * pos).xyz;
}