9b9ae5cf38
Implementation of "A Scalable and Production Ready Sky and Atmosphere Rendering Technique" by Sébastien Hillaire (2020).
16 lines
345 B
GLSL
16 lines
345 B
GLSL
#version 330 core
|
|
|
|
layout(location = 0) in vec4 pos;
|
|
|
|
out vec3 vRayDir;
|
|
out vec3 vRayDirView;
|
|
|
|
uniform mat4 osg_ModelViewMatrix;
|
|
uniform mat4 osg_ModelViewProjectionMatrix;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = osg_ModelViewProjectionMatrix * pos;
|
|
vRayDir = normalize(pos.xyz);
|
|
vRayDirView = (osg_ModelViewMatrix * vec4(vRayDir, 0.0)).xyz;
|
|
}
|