a06298055a
from Chris RINGEVAL https://sourceforge.net/p/flightgear/fgdata/merge-requests/269/ Squashed commit of the following: commit 23194c0fed49609999b4da67b2990af774f7df03 Author: Chris Ringeval <eatdirt@protonmail.com> Date: Sun Jan 30 23:52:09 2022 +0100 Remove CC-BY-SA 3.0 texture provided by EAS and replace it with one made by myself commit cb30c7972ba3db6b4cb4ad5f9dcd12d7e0ddbc1a Author: Chris Ringeval <eatdirt@protonmail.com> Date: Sun Dec 5 15:49:31 2021 +0100 Optimize shaders for vram usage and use new uniforms commit 7541e49c6757a23b08684f1c4354e84b9af3bcc3 Author: Chris Ringeval <eatdirt@protonmail.com> Date: Thu Dec 2 17:22:55 2021 +0100 Reduce the oversized galaxy texture to 400kB commit 0e6591907a9978077dc6dff1b53dea7c439a6cc4 Author: Chris Ringeval <eatdirt@protonmail.com> Date: Tue Nov 30 23:49:24 2021 +0100 Add Milky Way onto the night sky
29 lines
582 B
GLSL
29 lines
582 B
GLSL
// -*-C++-*-
|
|
//
|
|
// Chris Ringeval (Novermber 2021)
|
|
//
|
|
|
|
#version 120
|
|
|
|
|
|
uniform vec3 fg_CameraWorldUp;
|
|
uniform mat4 osg_ViewMatrix;
|
|
|
|
varying vec3 eye2VertInEyeSpace;
|
|
varying vec3 eye2ZenithInEyeSpace;
|
|
varying vec3 eye2MoonInEyeSpace;
|
|
|
|
uniform vec3 fg_MoonDirection;
|
|
|
|
|
|
void main()
|
|
{
|
|
|
|
eye2VertInEyeSpace = (gl_ModelViewMatrix * gl_Vertex - vec4(0.0,0.0,0.0,1.0)).xyz;
|
|
eye2ZenithInEyeSpace = (osg_ViewMatrix * vec4(fg_CameraWorldUp,0.0)).xyz;
|
|
eye2MoonInEyeSpace = fg_MoonDirection;
|
|
|
|
gl_Position = ftransform();
|
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
}
|
|
|