Error while sending PM

Off topic discussion zone.

Moderators: winston, another_commander, Cody

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Error while sending PM

Post 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
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post 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
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Post 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.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post 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
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

no problem, sorry about mangling the shaders so badly, hopefully they are working now :)
Post Reply