2021-04-10 09:14:16 +00:00
|
|
|
#version 330 core
|
|
|
|
|
|
|
|
layout(location = 0) in vec4 pos;
|
|
|
|
|
2021-07-28 07:40:04 +00:00
|
|
|
out vec3 vRayDir;
|
|
|
|
out vec3 vRayDirView;
|
2021-04-10 09:14:16 +00:00
|
|
|
|
2021-07-28 07:40:04 +00:00
|
|
|
uniform mat4 osg_ModelViewMatrix;
|
2021-04-10 09:14:16 +00:00
|
|
|
uniform mat4 osg_ModelViewProjectionMatrix;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
2021-07-28 07:40:04 +00:00
|
|
|
vRayDir = normalize(pos.xyz);
|
|
|
|
vRayDirView = (osg_ModelViewMatrix * vec4(vRayDir, 0.0)).xyz;
|
2021-04-10 09:14:16 +00:00
|
|
|
}
|