2023-11-06 13:51:53 +00:00
|
|
|
#version 330 core
|
|
|
|
|
|
|
|
layout(location = 0) in vec4 pos;
|
|
|
|
layout(location = 2) in vec4 vertex_color;
|
|
|
|
|
|
|
|
out VS_OUT {
|
|
|
|
vec4 color;
|
2024-01-07 15:18:55 +00:00
|
|
|
vec3 view_vector;
|
2023-11-06 13:51:53 +00:00
|
|
|
} vs_out;
|
|
|
|
|
2024-01-07 15:18:55 +00:00
|
|
|
uniform mat4 osg_ModelViewMatrix;
|
2023-11-06 13:51:53 +00:00
|
|
|
uniform mat4 osg_ModelViewProjectionMatrix;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
|
|
|
vs_out.color = vertex_color;
|
2024-01-07 15:18:55 +00:00
|
|
|
vs_out.view_vector = (osg_ModelViewMatrix * pos).xyz;
|
2023-11-06 13:51:53 +00:00
|
|
|
}
|