From 0e18c75b0bacd7f6f67e8200690de81cc24e507d Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 17 Jun 2015 09:23:12 -0700 Subject: [PATCH] cleanup --- libraries/render-utils/src/SkyFromAtmosphere.slf | 4 ++-- libraries/render-utils/src/SkyFromAtmosphere.slv | 8 +++----- libraries/render-utils/src/SkyFromSpace.slf | 4 ++-- libraries/render-utils/src/SkyFromSpace.slv | 8 ++++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/libraries/render-utils/src/SkyFromAtmosphere.slf b/libraries/render-utils/src/SkyFromAtmosphere.slf index a9e2bc6156..53d0573737 100755 --- a/libraries/render-utils/src/SkyFromAtmosphere.slf +++ b/libraries/render-utils/src/SkyFromAtmosphere.slf @@ -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; diff --git a/libraries/render-utils/src/SkyFromAtmosphere.slv b/libraries/render-utils/src/SkyFromAtmosphere.slv index 99c782adf1..29c907b94c 100755 --- a/libraries/render-utils/src/SkyFromAtmosphere.slv +++ b/libraries/render-utils/src/SkyFromAtmosphere.slv @@ -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)$> } diff --git a/libraries/render-utils/src/SkyFromSpace.slf b/libraries/render-utils/src/SkyFromSpace.slf index 4e13438ccb..5f6ce80efa 100755 --- a/libraries/render-utils/src/SkyFromSpace.slf +++ b/libraries/render-utils/src/SkyFromSpace.slf @@ -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; diff --git a/libraries/render-utils/src/SkyFromSpace.slv b/libraries/render-utils/src/SkyFromSpace.slv index 9090d76da2..6427af6715 100755 --- a/libraries/render-utils/src/SkyFromSpace.slv +++ b/libraries/render-utils/src/SkyFromSpace.slv @@ -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)$> -} \ No newline at end of file +}