Page 1 of 1

Error while sending PM

Posted: Mon Aug 31, 2009 12:02 pm
by Commander McLane
Hi, what does it mean if I get only the following error while trying to PM Griff?
annoying error message wrote:
Could not connect to smtp host : 110 : Connection timed out

DEBUG MODE

Line : 112
File : smtp.php




Oh, and Griff, if you happen to read this here, what I wanted to PM you about is this:

Hi, Griff!

It turns out that the corrected new shaders for the Salvage Gang are still buggy. Unfortunately I didn't check it out before I uploaded Anarchies2.2, so the OXP is still not okay. :x

First of all there is a missing #endif in each shader (the one marked):

anarchies-salvager-tunnel.fragment:

Code: Select all

// Texture Information from Oolite.
   uniform sampler2D      tex0; // Difuse and Illumination map
   
   
// Uniforms from Oolite
   uniform float  uTime; //Time from game clock
   
// Information from vertex shader.
   varying vec3         v_normal;   // Surface normal
   varying vec3         v_pos;      // Vertex/fragment position in eye space

   // Constants
   const float specExponent = 2.0;


//Set the Lamp color for the hull spotlights
 //  vec4 LampColor = vec4(0.9926, 0.9686, 0.7325, 1.0);
     vec4 LampColor = vec4(0.9, 0.1, 0.0, 1.0);

// Irregular flickering function
   #ifdef OO_REDUCED_COMPLEXITY 
   #define Pulse(v, ts) ((v) * 0.95) 
   #define Blink_on_off(value) (1.0)
   #else

     float Pulse(float value, float timeScale)
     {
        float t = uTime * timeScale;   

        float s0 = t;
        s0 -= floor(s0);
        float sum = abs( s0 - 0.5);
   
        float s1 = t * 0.7 - 0.05;
        s1 -= floor(s1);
        sum += abs(s1 - 0.5) - 0.25;
   
        float s2 = t * 1.3 - 0.3;
        s2 -= floor(s2);
        sum += abs(s2 - 0.5) - 0.25;
   
        float s3 = t * 5.09 - 0.6;
        s3 -= floor(s3);
        sum += abs(s3 - 0.5) - 0.25;

        return (sum * 0.1 + 0.9) * value;

      }
   #endif     <<========================= INSERTED BY CMcL

   
// Calculate the contribution of a single light. Ought to be a function, but OS X's GLSlang implementation isn't sufficiently clever.
   #define LIGHT(idx) \
        { \
           vec3 lightVector   = normalize(gl_LightSource[idx].position.xyz); \
           vec3 reflection   = normalize(-reflect(lightVector, v_normal)); \
           diffuse += gl_FrontMaterial.diffuse * gl_LightSource[idx].diffuse * max(dot(v_normal, lightVector), 0.0); \
           specular += gl_LightSource[idx].diffuse * pow(max(dot(reflection, eyeVector), 0.0), specExponent); \
        }
   
   void main(void)
   {
   vec4 diffuse = vec4(0.0), specular = vec4(0.0);
   vec3 eyeVector = normalize(-v_pos);
 
// Load texture data
   vec2 texCoord = gl_TexCoord[0].st;
   vec4 diffuseMap = texture2D(tex0, texCoord);
   
// calculate specular effects
   float specIntensity = (diffuseMap.r + diffuseMap.g + diffuseMap.b);
   
/*   Light 0 is the "showroom" light, used in the demo screen and shipyard.
     Light 1 is the sun.
*/
   #ifdef OO_LIGHT_0_FIX
   LIGHT(0);
   #endif
   LIGHT(1);
   diffuse += gl_FrontMaterial.ambient * gl_LightModel.ambient;
   
// Calculate the lighting 
   vec4 color = diffuseMap * diffuse;
   

// Add in the specular effects for simple shader mode
   color += specular * color * specIntensity;
   
 // Add in the glow effects for simple shader mode  
   color += diffuseMap * diffuseMap.a * LampColor * 5.0 * Pulse(min(1.0, 7.0), 3.0);
// Output final color
   gl_FragColor = vec4(color.rgb, 1.0);
   }
anarchies-salvager-tunnel-pipes.fragment:

Code: Select all

// Texture Information from Oolite.
   uniform sampler2D      tex0; // Difuse and Illumination map
   
   
// Uniforms from Oolite
   uniform float  uTime; //Time from game clock
   
// Information from vertex shader.
   varying vec3         v_normal;   // Surface normal
   varying vec3         v_pos;      // Vertex/fragment position in eye space

   // Constants
   const float specExponent = 2.0;


//Set the Lamp color for the hull spotlights
     vec4 LampColor = vec4(0.9, 0.1, 0.0, 1.0);

// Irregular flickering function
   #ifdef OO_REDUCED_COMPLEXITY 
   #define Pulse(v, ts) ((v) * 0.95) 
   #define Blink_on_off(value) (1.0)
   #else

     float Pulse(float value, float timeScale)
     {
        float t = uTime * timeScale;   

        float s0 = t;
        s0 -= floor(s0);
        float sum = abs( s0 - 0.5);
   
        float s1 = t * 0.7 - 0.05;
        s1 -= floor(s1);
        sum += abs(s1 - 0.5) - 0.25;
   
        float s2 = t * 1.3 - 0.3;
        s2 -= floor(s2);
        sum += abs(s2 - 0.5) - 0.25;
   
        float s3 = t * 5.09 - 0.6;
        s3 -= floor(s3);
        sum += abs(s3 - 0.5) - 0.25;

        return (sum * 0.1 + 0.9) * value;

      }
   #endif     <<========================= INSERTED BY CMcL

   
// Calculate the contribution of a single light. Ought to be a function, but OS X's GLSlang implementation isn't sufficiently clever.
   #define LIGHT(idx) \
        { \
           vec3 lightVector   = normalize(gl_LightSource[idx].position.xyz); \
           vec3 reflection   = normalize(-reflect(lightVector, v_normal)); \
           diffuse += gl_FrontMaterial.diffuse * gl_LightSource[idx].diffuse * max(dot(v_normal, lightVector), 0.0); \
           specular += gl_LightSource[idx].diffuse * pow(max(dot(reflection, eyeVector), 0.0), specExponent); \
        }
   
   void main(void)
   {
   vec4 diffuse = vec4(0.0), specular = vec4(0.0);
   vec3 eyeVector = normalize(-v_pos);
 
// Load texture data
   vec2 texCoord = gl_TexCoord[0].st;
   vec4 diffuseMap = texture2D(tex0, texCoord);
   
// calculate specular effects
   float specIntensity = (diffuseMap.r + diffuseMap.g + diffuseMap.b);
   
/*   Light 0 is the "showroom" light, used in the demo screen and shipyard.
     Light 1 is the sun.
*/
   #ifdef OO_LIGHT_0_FIX
   LIGHT(0);
   #endif
   LIGHT(1);
   diffuse += gl_FrontMaterial.ambient * gl_LightModel.ambient;

// Discard any pixels cut away from the fragment by the clipmap   
   if (diffuseMap.a > 0.99) discard; 

   
// Calculate the lighting 
   vec4 color = diffuseMap * diffuse;
   

// Add in the specular effects for simple shader mode
   color += specular * color * specIntensity;
   
 // Add in the glow effects for simple shader mode  
   color += diffuseMap * LampColor * 0.3 * Pulse(min(1.0, 7.0), 3.0);
// Output final color
   gl_FragColor = vec4(color.rgb, 1.0);
   }
I think I inserted them in the right place.

However, it still isn't working. Now the log complains:
logfile wrote:
[shader.link.failure]: ***** GLSL shader linking failed:
>>>>> GLSL log:
ERROR: Fragment shader reads varying 'v_pos' which is not written by vertex shader.
ERROR: Fragment shader reads varying 'v_normal' which is not written by vertex shader.


[shader.link.failure]: ***** GLSL shader linking failed:
>>>>> GLSL log:
ERROR: Fragment shader reads varying 'v_pos' which is not written by vertex shader.
ERROR: Fragment shader reads varying 'v_normal' which is not written by vertex shader.
The corresponding vertex shader looks like this:

anarchies-salvager-tunnel.vertex:

Code: Select all

void main()
{
   gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
Help! :o

CMcL

Posted: Mon Aug 31, 2009 12:08 pm
by Cody
Hi Commander.

re first point, I think you'll find that the PM was sent anyway. I think it's the boards. See here:

https://bb.oolite.space/viewtopic.php?t= ... 17fd7bee5f

Regards

Posted: Mon Aug 31, 2009 1:17 pm
by Diziet Sma
Check your outbox afterwards, you will see it has been sent.. it can happen with posts too.. if there is any email notification related to a PM or post, you'll get that message as the emailing side of the equation fails.

Posted: Tue Sep 01, 2009 7:51 am
by Commander McLane
Oops, you're right. Message was sent the first time. Should've looked in the Outbox.

@Griff: Sorry for sending it five times, and then posting it here again. You must've thought I'm a crazy annoying guy. :oops: Oh, and thanks for the answer! :D

Posted: Tue Sep 01, 2009 5:31 pm
by Griff
no problem, sorry about mangling the shaders so badly, hopefully they are working now :)