mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
cleanup
This commit is contained in:
parent
ea98581d22
commit
0e18c75b0b
4 changed files with 11 additions and 13 deletions
|
@ -51,7 +51,7 @@ uniform vec3 v3LightPos;
|
|||
uniform float g;
|
||||
uniform float g2;
|
||||
|
||||
varying vec3 myPosition;
|
||||
varying vec3 position;
|
||||
|
||||
|
||||
float scale(float fCos)
|
||||
|
@ -64,7 +64,7 @@ float scale(float fCos)
|
|||
void main (void)
|
||||
{
|
||||
// Get the ray from the camera to the vertex, and its length (which is the far point of the ray passing through the atmosphere)
|
||||
vec3 v3Pos = myPosition;
|
||||
vec3 v3Pos = position;
|
||||
vec3 v3Ray = v3Pos - v3CameraPos;
|
||||
float fFar = length(v3Ray);
|
||||
v3Ray /= fFar;
|
||||
|
|
|
@ -53,18 +53,16 @@ uniform float fScaleOverScaleDepth; // fScale / fScaleDepth
|
|||
const int nSamples = 2;
|
||||
const float fSamples = 2.0;
|
||||
|
||||
varying vec3 myPosition;
|
||||
varying vec3 position;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
// Get the ray from the camera to the vertex, and its length (which is the far point of the ray passing through the atmosphere)
|
||||
myPosition = gl_Vertex.xyz * fOuterRadius;
|
||||
position = gl_Vertex.xyz * fOuterRadius;
|
||||
|
||||
//gl_Position = gl_ModelViewProjectionMatrix * vec4(position, 1.0);
|
||||
|
||||
// standard transform
|
||||
TransformCamera cam = getTransformCamera();
|
||||
TransformObject obj = getTransformObject();
|
||||
vec4 v4pos = vec4(myPosition, 1.0);
|
||||
vec4 v4pos = vec4(position, 1.0);
|
||||
<$transformModelToClipPos(cam, obj, v4pos, gl_Position)$>
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ uniform float g2;
|
|||
const int nSamples = 2;
|
||||
const float fSamples = 2.0;
|
||||
|
||||
varying vec3 myPosition;
|
||||
varying vec3 position;
|
||||
|
||||
float scale(float fCos)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ float scale(float fCos)
|
|||
void main (void)
|
||||
{
|
||||
// Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)
|
||||
vec3 v3Pos = myPosition;
|
||||
vec3 v3Pos = position;
|
||||
vec3 v3Ray = v3Pos - v3CameraPos;
|
||||
float fFar = length(v3Ray);
|
||||
v3Ray /= fFar;
|
||||
|
|
|
@ -38,15 +38,15 @@
|
|||
|
||||
uniform float fOuterRadius; // The outer (atmosphere) radius
|
||||
|
||||
varying vec3 myPosition;
|
||||
varying vec3 position;
|
||||
|
||||
|
||||
void main(void) {
|
||||
myPosition = gl_Vertex.xyz * fOuterRadius;
|
||||
position = gl_Vertex.xyz * fOuterRadius;
|
||||
|
||||
// standard transform
|
||||
TransformCamera cam = getTransformCamera();
|
||||
TransformObject obj = getTransformObject();
|
||||
vec4 v4pos = vec4(myPosition, 1.0);
|
||||
vec4 v4pos = vec4(position, 1.0);
|
||||
<$transformModelToClipPos(cam, obj, v4pos, gl_Position)$>
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue