Page 1 of 2

1.5.0pre3 bugs

Posted: 02.06.2007, 20:48
by PlutonianEmpire
In pre2, I could see the new atmosphere and the "lunarlambert" codes work wonders. but now, in pre3, whenever I switch to openGL 2, every single object, except for stars and galaxies, turns bright red, even if they don't have the new codes in their ssc files.

this is what my shaders.log file shows:

Code: Select all

Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: varying vec2 specTexCoord;
  9: uniform float textureOffset;
 10: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 11: float NV = dot(gl_Normal, eyeDir);
 12: varying vec4 diffFactors;
 13: varying vec3 normal;
 14: varying vec3 lightHalfVec0;
 15:
 16: void main(void)
 17: {
 18: float NL;
 19: normal = gl_Normal;
 20: NL = max(0.0, dot(gl_Normal, light0_direction));
 21: diffFactors.x = NL;
 22: lightHalfVec0 = light0_direction + eyeDir;
 23: diffTexCoord = gl_MultiTexCoord0.st + vec2(textureOffset, 0.0);
 24: specTexCoord = gl_MultiTexCoord1.st;
 25: gl_Position = ftransform();
 26: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: uniform sampler2D specTex;
  4: varying vec2 diffTexCoord;
  5: varying vec2 specTexCoord;
  6: uniform vec3 ambientColor;
  7: uniform float opacity;
  8: varying vec4 diffFactors;
  9: vec4 diff = vec4(ambientColor, opacity);
 10: varying vec3 normal;
 11: vec4 spec = vec4(0.0);
 12: uniform float shininess;
 13: varying vec3 lightHalfVec0;
 14: uniform vec3 lightcolor0;
 15: uniform vec3 lightspecColor0;
 16:
 17: void main(void)
 18: {
 19: vec4 color;
 20: float NH;
 21: vec3 n = normalize(normal);
 22: diff.rgb += diffFactors.x * lightcolor0;
 23: NH = max(0.0, dot(n, normalize(lightHalfVec0)));
 24: spec.rgb += diffFactors.x * pow(NH, shininess) * lightspecColor0;
 25: color = texture2D(diffTex, diffTexCoord.st);
 26: gl_FragColor = color * diff + texture2D(specTex, specTexCoord.st) * spec;
 27: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: varying vec2 specTexCoord;
  9: varying vec2 nightTexCoord;
 10: uniform float textureOffset;
 11: uniform vec3 atmosphereRadius;
 12: uniform float mieCoeff;
 13: uniform float mieH;
 14: uniform float mieK;
 15: uniform vec3 rayleighCoeff;
 16: uniform float rayleighH;
 17: uniform vec3 scatterCoeffSum;
 18: uniform vec3 invScatterCoeffSum;
 19: uniform vec3 extinctionCoeff;
 20: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 21: float NV = dot(gl_Normal, eyeDir);
 22: varying vec4 diffFactors;
 23: varying vec3 normal;
 24: varying vec3 lightHalfVec0;
 25: varying vec3 scatterEx;
 26:
 27: void main(void)
 28: {
 29: float NL;
 30: normal = gl_Normal;
 31: NL = max(0.0, dot(gl_Normal, light0_direction));
 32: diffFactors.x = NL;
 33: lightHalfVec0 = light0_direction + eyeDir;
 34: diffTexCoord = gl_MultiTexCoord0.st + vec2(textureOffset, 0.0);
 35: specTexCoord = gl_MultiTexCoord1.st;
 36: nightTexCoord = gl_MultiTexCoord2.st;
 37: {
 38:     float rq = dot(eyePosition, eyeDir);
 39:     float qq = dot(eyePosition, eyePosition) - atmosphereRadius.y;
 40:     float d = sqrt(rq * rq - qq);
 41:     vec3 atmEnter = eyePosition + min(0.0, (-rq + d)) * eyeDir;
 42:     vec3 atmLeave = gl_Vertex.xyz;
 43:     vec3 atmSamplePoint = (atmEnter + atmLeave) * 0.5;
 44:     vec3 atmSamplePointSun = atmEnter * 0.5 + atmLeave * 0.5;
 45:     rq = dot(atmSamplePointSun, light0_direction);
 46:     qq = dot(atmSamplePointSun, atmSamplePointSun) - atmosphereRadius.y;
 47:     d = sqrt(rq * rq - qq);
 48:     float distSun = -rq + d;
 49:     float distAtm = length(atmEnter - atmLeave);
 50:     float density = 0.0;
 51:     atmSamplePoint = atmEnter * 0.333 + atmLeave * 0.667;
 52:     float h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 53:     density += exp(-h * mieH);
 54:     atmSamplePoint = atmEnter * 0.667 + atmLeave * 0.333;
 55:     h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 56:     density += exp(-h * mieH);
 57:     vec3 sunColor = exp(-extinctionCoeff * density * distSun);
 58:     vec3 ex = exp(-extinctionCoeff * density * distAtm);
 59:     float cosTheta = dot(eyeDir, light0_direction);
 60:     float phMie = (1.0 - mieK * mieK) / ((1.0 - mieK * cosTheta) * (1.0 - mieK * cosTheta));
 61:     float phRayleigh = 1.0;
 62:     scatterEx = ex;
 63:     gl_FrontSecondaryColor.rgb = (phRayleigh * rayleighCoeff + phMie * mieCoeff) * invScatterCoeffSum * sunColor * (1.0 - exp(-scatterCoeffSum * density * distAtm));
 64: }
 65: gl_Position = ftransform();
 66: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: uniform sampler2D specTex;
  4: uniform sampler2D nightTex;
  5: varying vec2 diffTexCoord;
  6: varying vec2 specTexCoord;
  7: varying vec2 nightTexCoord;
  8: uniform vec3 ambientColor;
  9: uniform float opacity;
 10: varying vec4 diffFactors;
 11: vec4 diff = vec4(ambientColor, opacity);
 12: varying vec3 normal;
 13: vec4 spec = vec4(0.0);
 14: uniform float shininess;
 15: varying vec3 lightHalfVec0;
 16: uniform vec3 lightcolor0;
 17: uniform vec3 lightspecColor0;
 18: varying vec3 scatterEx;
 19:
 20: void main(void)
 21: {
 22: vec4 color;
 23: float NH;
 24: vec3 n = normalize(normal);
 25: diff.rgb += diffFactors.x * lightcolor0;
 26: NH = max(0.0, dot(n, normalize(lightHalfVec0)));
 27: spec.rgb += diffFactors.x * pow(NH, shininess) * lightspecColor0;
 28: color = texture2D(diffTex, diffTexCoord.st);
 29: gl_FragColor = color * diff + texture2D(specTex, specTexCoord.st) * spec;
 30: float totalLight = diffFactors.x;
 31: totalLight = 1.0 - totalLight;
 32: totalLight = totalLight * totalLight * totalLight * totalLight;
 33: gl_FragColor += texture2D(nightTex, nightTexCoord.st) * totalLight;
 34: gl_FragColor.rgb = gl_FragColor.rgb * scatterEx + gl_SecondaryColor.rgb;
 35: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: uniform float textureOffset;
  9: uniform vec3 atmosphereRadius;
 10: uniform float mieCoeff;
 11: uniform float mieH;
 12: uniform float mieK;
 13: uniform vec3 rayleighCoeff;
 14: uniform float rayleighH;
 15: uniform vec3 scatterCoeffSum;
 16: uniform vec3 invScatterCoeffSum;
 17: uniform vec3 extinctionCoeff;
 18: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 19: float NV = dot(gl_Normal, eyeDir);
 20: uniform vec3 ambientColor;
 21: uniform float opacity;
 22: varying vec4 diff;
 23: varying vec3 scatterEx;
 24:
 25: void main(void)
 26: {
 27: float NL;
 28: diff = vec4(ambientColor, opacity);
 29: NL = max(0.0, dot(gl_Normal, light0_direction));
 30: diff.rgb += light0_diffuse * NL;
 31: diffTexCoord = gl_MultiTexCoord0.st + vec2(textureOffset, 0.0);
 32: {
 33:     float rq = dot(eyePosition, eyeDir);
 34:     float qq = dot(eyePosition, eyePosition) - atmosphereRadius.y;
 35:     float d = sqrt(rq * rq - qq);
 36:     vec3 atmEnter = eyePosition + min(0.0, (-rq + d)) * eyeDir;
 37:     vec3 atmLeave = gl_Vertex.xyz;
 38:     vec3 atmSamplePoint = (atmEnter + atmLeave) * 0.5;
 39:     vec3 atmSamplePointSun = atmEnter * 0.5 + atmLeave * 0.5;
 40:     rq = dot(atmSamplePointSun, light0_direction);
 41:     qq = dot(atmSamplePointSun, atmSamplePointSun) - atmosphereRadius.y;
 42:     d = sqrt(rq * rq - qq);
 43:     float distSun = -rq + d;
 44:     float distAtm = length(atmEnter - atmLeave);
 45:     float density = 0.0;
 46:     atmSamplePoint = atmEnter * 0.333 + atmLeave * 0.667;
 47:     float h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 48:     density += exp(-h * mieH);
 49:     atmSamplePoint = atmEnter * 0.667 + atmLeave * 0.333;
 50:     h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 51:     density += exp(-h * mieH);
 52:     vec3 sunColor = exp(-extinctionCoeff * density * distSun);
 53:     vec3 ex = exp(-extinctionCoeff * density * distAtm);
 54:     float cosTheta = dot(eyeDir, light0_direction);
 55:     float phMie = (1.0 - mieK * mieK) / ((1.0 - mieK * cosTheta) * (1.0 - mieK * cosTheta));
 56:     float phRayleigh = 1.0;
 57:     scatterEx = ex;
 58:     gl_FrontSecondaryColor.rgb = (phRayleigh * rayleighCoeff + phMie * mieCoeff) * invScatterCoeffSum * sunColor * (1.0 - exp(-scatterCoeffSum * density * distAtm));
 59: }
 60: gl_Position = ftransform();
 61: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: varying vec2 diffTexCoord;
  4: varying vec4 diff;
  5: varying vec3 scatterEx;
  6:
  7: void main(void)
  8: {
  9: vec4 color;
 10: color = texture2D(diffTex, diffTexCoord.st);
 11: gl_FragColor = color * diff;
 12: gl_FragColor.rgb = gl_FragColor.rgb * scatterEx + gl_SecondaryColor.rgb;
 13: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: uniform vec3 atmosphereRadius;
  8: uniform float mieCoeff;
  9: uniform float mieH;
 10: uniform float mieK;
 11: uniform vec3 rayleighCoeff;
 12: uniform float rayleighH;
 13: uniform vec3 scatterCoeffSum;
 14: uniform vec3 invScatterCoeffSum;
 15: uniform vec3 extinctionCoeff;
 16: varying vec3 scatteredColor0;
 17: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 18: float NV = dot(gl_Normal, eyeDir);
 19: varying vec3 scatterEx;
 20: varying vec3 eyeDir_obj;
 21:
 22: void main(void)
 23: {
 24: float NL;
 25: {
 26:     float rq = dot(eyePosition, eyeDir);
 27:     float qq = dot(eyePosition, eyePosition) - atmosphereRadius.y;
 28:     float d = sqrt(rq * rq - qq);
 29:     vec3 atmEnter = eyePosition + min(0.0, (-rq + d)) * eyeDir;
 30:     vec3 atmLeave = gl_Vertex.xyz;
 31:     vec3 atmSamplePoint = (atmEnter + atmLeave) * 0.5;
 32:     vec3 atmSamplePointSun = atmEnter * 0.5 + atmLeave * 0.5;
 33:     rq = dot(atmSamplePointSun, light0_direction);
 34:     qq = dot(atmSamplePointSun, atmSamplePointSun) - atmosphereRadius.y;
 35:     d = sqrt(rq * rq - qq);
 36:     float distSun = -rq + d;
 37:     float distAtm = length(atmEnter - atmLeave);
 38:     float density = 0.0;
 39:     atmSamplePoint = atmEnter * 0.333 + atmLeave * 0.667;
 40:     float h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 41:     density += exp(-h * mieH);
 42:     atmSamplePoint = atmEnter * 0.667 + atmLeave * 0.333;
 43:     h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 44:     density += exp(-h * mieH);
 45:     vec3 sunColor = exp(-extinctionCoeff * density * distSun);
 46:     vec3 ex = exp(-extinctionCoeff * density * distAtm);
 47:     scatterEx = ex;
 48:     scatteredColor0 = sunColor * (1.0 - exp(-scatterCoeffSum * density * distAtm));
 49: }
 50: eyeDir_obj = eyeDir;
 51: gl_Position = ftransform();
 52: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: varying vec3 scatterEx;
  3: varying vec3 eyeDir_obj;
  4: uniform float mieK;
  5: uniform float mieCoeff;
  6: uniform vec3  rayleighCoeff;
  7: uniform vec3  invScatterCoeffSum;
  8: uniform vec3 light0_direction;
  9: varying vec3 scatteredColor0;
 10:
 11: void main(void)
 12: {
 13: vec3 color = vec3(0.0, 0.0, 0.0);
 14: vec3 V = normalize(eyeDir_obj);
 15:     float cosTheta = dot(V, light0_direction);
 16:     float phMie = (1.0 - mieK * mieK) / ((1.0 - mieK * cosTheta) * (1.0 - mieK * cosTheta));
 17:     float phRayleigh = 1.0;
 18:     color += (phRayleigh * rayleighCoeff + phMie * mieCoeff) * invScatterCoeffSum * scatteredColor0;
 19:     gl_FragColor = vec4(color, dot(scatterEx, vec3(0.333, 0.333, 0.333)));
 20: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: varying vec2 normTexCoord;
  9: varying vec2 specTexCoord;
 10: varying vec2 nightTexCoord;
 11: uniform float textureOffset;
 12: uniform vec3 atmosphereRadius;
 13: uniform float mieCoeff;
 14: uniform float mieH;
 15: uniform float mieK;
 16: uniform vec3 rayleighCoeff;
 17: uniform float rayleighH;
 18: uniform vec3 scatterCoeffSum;
 19: uniform vec3 invScatterCoeffSum;
 20: uniform vec3 extinctionCoeff;
 21: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 22: attribute vec3 tangent;
 23: varying vec3 lightDir_tan_0;
 24: varying vec3 eyeDir_tan;
 25: varying vec3 scatterEx;
 26:
 27: void main(void)
 28: {
 29: float NL;
 30: vec3 bitangent = cross(gl_Normal, tangent);
 31: eyeDir_tan.x = dot(tangent, eyeDir);
 32: eyeDir_tan.y = dot(-bitangent, eyeDir);
 33: eyeDir_tan.z = dot(gl_Normal, eyeDir);
 34: NL = max(0.0, dot(gl_Normal, light0_direction));
 35: lightDir_tan_0.x = dot(tangent, light0_direction);
 36: lightDir_tan_0.y = dot(-bitangent, light0_direction);
 37: lightDir_tan_0.z = dot(gl_Normal, light0_direction);
 38: diffTexCoord = gl_MultiTexCoord0.st + vec2(textureOffset, 0.0);
 39: normTexCoord = gl_MultiTexCoord1.st + vec2(textureOffset, 0.0);
 40: specTexCoord = gl_MultiTexCoord2.st;
 41: nightTexCoord = gl_MultiTexCoord3.st;
 42: {
 43:     float rq = dot(eyePosition, eyeDir);
 44:     float qq = dot(eyePosition, eyePosition) - atmosphereRadius.y;
 45:     float d = sqrt(rq * rq - qq);
 46:     vec3 atmEnter = eyePosition + min(0.0, (-rq + d)) * eyeDir;
 47:     vec3 atmLeave = gl_Vertex.xyz;
 48:     vec3 atmSamplePoint = (atmEnter + atmLeave) * 0.5;
 49:     vec3 atmSamplePointSun = atmEnter * 0.5 + atmLeave * 0.5;
 50:     rq = dot(atmSamplePointSun, light0_direction);
 51:     qq = dot(atmSamplePointSun, atmSamplePointSun) - atmosphereRadius.y;
 52:     d = sqrt(rq * rq - qq);
 53:     float distSun = -rq + d;
 54:     float distAtm = length(atmEnter - atmLeave);
 55:     float density = 0.0;
 56:     atmSamplePoint = atmEnter * 0.333 + atmLeave * 0.667;
 57:     float h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 58:     density += exp(-h * mieH);
 59:     atmSamplePoint = atmEnter * 0.667 + atmLeave * 0.333;
 60:     h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 61:     density += exp(-h * mieH);
 62:     vec3 sunColor = exp(-extinctionCoeff * density * distSun);
 63:     vec3 ex = exp(-extinctionCoeff * density * distAtm);
 64:     float cosTheta = dot(eyeDir, light0_direction);
 65:     float phMie = (1.0 - mieK * mieK) / ((1.0 - mieK * cosTheta) * (1.0 - mieK * cosTheta));
 66:     float phRayleigh = 1.0;
 67:     scatterEx = ex;
 68:     gl_FrontSecondaryColor.rgb = (phRayleigh * rayleighCoeff + phMie * mieCoeff) * invScatterCoeffSum * sunColor * (1.0 - exp(-scatterCoeffSum * density * distAtm));
 69: }
 70: gl_Position = ftransform();
 71: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: uniform sampler2D normTex;
  4: uniform sampler2D specTex;
  5: uniform sampler2D nightTex;
  6: varying vec2 diffTexCoord;
  7: varying vec2 normTexCoord;
  8: varying vec2 specTexCoord;
  9: varying vec2 nightTexCoord;
 10: uniform vec3 ambientColor;
 11: uniform float opacity;
 12: vec4 diff = vec4(ambientColor, opacity);
 13: varying vec3 eyeDir_tan;
 14: vec4 spec = vec4(0.0);
 15: uniform float shininess;
 16: varying vec3 lightDir_tan_0;
 17: uniform vec3 lightcolor0;
 18: uniform vec3 lightspecColor0;
 19: varying vec3 scatterEx;
 20:
 21: void main(void)
 22: {
 23: vec4 color;
 24: vec3 n = texture2D(normTex, normTexCoord.st).xyz * 2.0 - vec3(1.0, 1.0, 1.0);
 25: float l;
 26: vec3 V = normalize(eyeDir_tan);
 27: vec3 H;
 28: float NH;
 29: float NL;
 30: NL = dot(lightDir_tan_0, n);
 31: l = max(0.0, dot(lightDir_tan_0, n)) * clamp(lightDir_tan_0.z * 8.0, 0.0, 1.0);
 32: float totalLight = l;
 33: diff.rgb += l * lightcolor0;
 34: H = normalize(eyeDir_tan + lightDir_tan_0);
 35: NH = max(0.0, dot(n, H));
 36: spec.rgb += l * pow(NH, shininess) * lightspecColor0;
 37: color = texture2D(diffTex, diffTexCoord.st);
 38: gl_FragColor = color * diff + texture2D(specTex, specTexCoord.st) * spec;
 39: totalLight = 1.0 - totalLight;
 40: totalLight = totalLight * totalLight * totalLight * totalLight;
 41: gl_FragColor += texture2D(nightTex, nightTexCoord.st) * totalLight;
 42: gl_FragColor.rgb = gl_FragColor.rgb * scatterEx + gl_SecondaryColor.rgb;
 43: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: varying vec2 normTexCoord;
  9: varying vec2 specTexCoord;
 10: uniform float textureOffset;
 11: uniform vec3 atmosphereRadius;
 12: uniform float mieCoeff;
 13: uniform float mieH;
 14: uniform float mieK;
 15: uniform vec3 rayleighCoeff;
 16: uniform float rayleighH;
 17: uniform vec3 scatterCoeffSum;
 18: uniform vec3 invScatterCoeffSum;
 19: uniform vec3 extinctionCoeff;
 20: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 21: attribute vec3 tangent;
 22: varying vec3 lightDir_tan_0;
 23: varying vec3 eyeDir_tan;
 24: varying vec3 scatterEx;
 25:
 26: void main(void)
 27: {
 28: float NL;
 29: vec3 bitangent = cross(gl_Normal, tangent);
 30: eyeDir_tan.x = dot(tangent, eyeDir);
 31: eyeDir_tan.y = dot(-bitangent, eyeDir);
 32: eyeDir_tan.z = dot(gl_Normal, eyeDir);
 33: NL = max(0.0, dot(gl_Normal, light0_direction));
 34: lightDir_tan_0.x = dot(tangent, light0_direction);
 35: lightDir_tan_0.y = dot(-bitangent, light0_direction);
 36: lightDir_tan_0.z = dot(gl_Normal, light0_direction);
 37: diffTexCoord = gl_MultiTexCoord0.st + vec2(textureOffset, 0.0);
 38: normTexCoord = gl_MultiTexCoord1.st + vec2(textureOffset, 0.0);
 39: specTexCoord = gl_MultiTexCoord2.st;
 40: {
 41:     float rq = dot(eyePosition, eyeDir);
 42:     float qq = dot(eyePosition, eyePosition) - atmosphereRadius.y;
 43:     float d = sqrt(rq * rq - qq);
 44:     vec3 atmEnter = eyePosition + min(0.0, (-rq + d)) * eyeDir;
 45:     vec3 atmLeave = gl_Vertex.xyz;
 46:     vec3 atmSamplePoint = (atmEnter + atmLeave) * 0.5;
 47:     vec3 atmSamplePointSun = atmEnter * 0.5 + atmLeave * 0.5;
 48:     rq = dot(atmSamplePointSun, light0_direction);
 49:     qq = dot(atmSamplePointSun, atmSamplePointSun) - atmosphereRadius.y;
 50:     d = sqrt(rq * rq - qq);
 51:     float distSun = -rq + d;
 52:     float distAtm = length(atmEnter - atmLeave);
 53:     float density = 0.0;
 54:     atmSamplePoint = atmEnter * 0.333 + atmLeave * 0.667;
 55:     float h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 56:     density += exp(-h * mieH);
 57:     atmSamplePoint = atmEnter * 0.667 + atmLeave * 0.333;
 58:     h = max(0.0, length(atmSamplePoint) - atmosphereRadius.z);
 59:     density += exp(-h * mieH);
 60:     vec3 sunColor = exp(-extinctionCoeff * density * distSun);
 61:     vec3 ex = exp(-extinctionCoeff * density * distAtm);
 62:     float cosTheta = dot(eyeDir, light0_direction);
 63:     float phMie = (1.0 - mieK * mieK) / ((1.0 - mieK * cosTheta) * (1.0 - mieK * cosTheta));
 64:     float phRayleigh = 1.0;
 65:     scatterEx = ex;
 66:     gl_FrontSecondaryColor.rgb = (phRayleigh * rayleighCoeff + phMie * mieCoeff) * invScatterCoeffSum * sunColor * (1.0 - exp(-scatterCoeffSum * density * distAtm));
 67: }
 68: gl_Position = ftransform();
 69: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: uniform sampler2D normTex;
  4: uniform sampler2D specTex;
  5: varying vec2 diffTexCoord;
  6: varying vec2 normTexCoord;
  7: varying vec2 specTexCoord;
  8: uniform vec3 ambientColor;
  9: uniform float opacity;
 10: vec4 diff = vec4(ambientColor, opacity);
 11: varying vec3 eyeDir_tan;
 12: vec4 spec = vec4(0.0);
 13: uniform float shininess;
 14: varying vec3 lightDir_tan_0;
 15: uniform vec3 lightcolor0;
 16: uniform vec3 lightspecColor0;
 17: varying vec3 scatterEx;
 18:
 19: void main(void)
 20: {
 21: vec4 color;
 22: vec3 n = texture2D(normTex, normTexCoord.st).xyz * 2.0 - vec3(1.0, 1.0, 1.0);
 23: float l;
 24: vec3 V = normalize(eyeDir_tan);
 25: vec3 H;
 26: float NH;
 27: float NL;
 28: NL = dot(lightDir_tan_0, n);
 29: l = max(0.0, dot(lightDir_tan_0, n)) * clamp(lightDir_tan_0.z * 8.0, 0.0, 1.0);
 30: diff.rgb += l * lightcolor0;
 31: H = normalize(eyeDir_tan + lightDir_tan_0);
 32: NH = max(0.0, dot(n, H));
 33: spec.rgb += l * pow(NH, shininess) * lightspecColor0;
 34: color = texture2D(diffTex, diffTexCoord.st);
 35: gl_FragColor = color * diff + texture2D(specTex, specTexCoord.st) * spec;
 36: gl_FragColor.rgb = gl_FragColor.rgb * scatterEx + gl_SecondaryColor.rgb;
 37: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: uniform float textureOffset;
  9: uniform vec3 ambientColor;
 10: uniform float opacity;
 11: varying vec4 diff;
 12:
 13: void main(void)
 14: {
 15: float NL;
 16: diff = vec4(ambientColor, opacity);
 17: NL = max(0.0, dot(gl_Normal, light0_direction));
 18: diff.rgb += light0_diffuse * NL;
 19: diffTexCoord = gl_MultiTexCoord0.st;
 20: diffTexCoord.x += textureOffset;
 21: gl_Position = ftransform();
 22: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: varying vec2 diffTexCoord;
  4: varying vec4 diff;
  5:
  6: void main(void)
  7: {
  8: vec4 color;
  9: color = texture2D(diffTex, diffTexCoord.st);
 10: gl_FragColor = color * diff;
 11: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform float opacity;
  3: uniform vec3 light0_diffuse;
  4:
  5: void main(void)
  6: {
  7:     gl_TexCoord[0].st = gl_MultiTexCoord0.st;
  8:     gl_FrontColor = vec4(light0_diffuse, opacity);
  9:     gl_Position = ftransform();
 10: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3:
  4: void main(void)
  5: {
  6:     gl_FragColor = gl_Color * texture2D(diffTex, gl_TexCoord[0].st);
  7: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: varying vec2 normTexCoord;
  9: varying vec2 nightTexCoord;
 10: uniform float textureOffset;
 11: attribute vec3 tangent;
 12: varying vec3 lightDir_tan_0;
 13: varying float totalLight;
 14:
 15: void main(void)
 16: {
 17: float NL;
 18: totalLight = 0.0;
 19: vec3 bitangent = cross(gl_Normal, tangent);
 20: NL = max(0.0, dot(gl_Normal, light0_direction));
 21: lightDir_tan_0.x = dot(tangent, light0_direction);
 22: lightDir_tan_0.y = dot(-bitangent, light0_direction);
 23: lightDir_tan_0.z = dot(gl_Normal, light0_direction);
 24: totalLight += NL;
 25: totalLight = 1.0 - totalLight;
 26: totalLight = totalLight * totalLight * totalLight * totalLight;
 27: diffTexCoord = gl_MultiTexCoord0.st + vec2(textureOffset, 0.0);
 28: normTexCoord = gl_MultiTexCoord1.st + vec2(textureOffset, 0.0);
 29: nightTexCoord = gl_MultiTexCoord2.st;
 30: gl_Position = ftransform();
 31: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: uniform sampler2D normTex;
  4: uniform sampler2D nightTex;
  5: varying vec2 diffTexCoord;
  6: varying vec2 normTexCoord;
  7: varying vec2 nightTexCoord;
  8: uniform vec3 ambientColor;
  9: uniform float opacity;
 10: vec4 diff = vec4(ambientColor, opacity);
 11: varying vec3 lightDir_tan_0;
 12: uniform vec3 lightcolor0;
 13: varying float totalLight;
 14:
 15: void main(void)
 16: {
 17: vec4 color;
 18: vec3 n = texture2D(normTex, normTexCoord.st).xyz * 2.0 - vec3(1.0, 1.0, 1.0);
 19: float l;
 20: float NL;
 21: NL = dot(lightDir_tan_0, n);
 22: l = max(0.0, dot(lightDir_tan_0, n)) * clamp(lightDir_tan_0.z * 8.0, 0.0, 1.0);
 23: diff.rgb += l * lightcolor0;
 24: color = texture2D(diffTex, diffTexCoord.st);
 25: gl_FragColor = color * diff;
 26: gl_FragColor += texture2D(nightTex, nightTexCoord.st) * totalLight;
 27: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: varying vec2 diffTexCoord;
  8: varying vec2 normTexCoord;
  9: uniform float textureOffset;
 10: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
 11: attribute vec3 tangent;
 12: varying vec3 lightDir_tan_0;
 13: varying vec3 eyeDir_tan;
 14:
 15: void main(void)
 16: {
 17: float NL;
 18: vec3 bitangent = cross(gl_Normal, tangent);
 19: eyeDir_tan.x = dot(tangent, eyeDir);
 20: eyeDir_tan.y = dot(-bitangent, eyeDir);
 21: eyeDir_tan.z = dot(gl_Normal, eyeDir);
 22: NL = max(0.0, dot(gl_Normal, light0_direction));
 23: lightDir_tan_0.x = dot(tangent, light0_direction);
 24: lightDir_tan_0.y = dot(-bitangent, light0_direction);
 25: lightDir_tan_0.z = dot(gl_Normal, light0_direction);
 26: diffTexCoord = gl_MultiTexCoord0.st + vec2(textureOffset, 0.0);
 27: normTexCoord = gl_MultiTexCoord1.st + vec2(textureOffset, 0.0);
 28: gl_Position = ftransform();
 29: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: uniform sampler2D normTex;
  4: varying vec2 diffTexCoord;
  5: varying vec2 normTexCoord;
  6: uniform vec3 ambientColor;
  7: uniform float opacity;
  8: vec4 diff = vec4(ambientColor, opacity);
  9: varying vec3 eyeDir_tan;
 10: vec4 spec = vec4(0.0);
 11: uniform float shininess;
 12: uniform float lunarLambert;
 13: varying vec3 lightDir_tan_0;
 14: uniform vec3 lightcolor0;
 15:
 16: void main(void)
 17: {
 18: vec4 color;
 19: vec3 n = texture2D(normTex, normTexCoord.st).xyz * 2.0 - vec3(1.0, 1.0, 1.0);
 20: float l;
 21: vec3 V = normalize(eyeDir_tan);
 22: float NV = dot(n, V);
 23: float NL;
 24: NL = dot(lightDir_tan_0, n);
 25: NL = max(0.0, NL);
 26: l = mix(NL, (NL / (max(NV, 0.001) + NL)), lunarLambert) * clamp(lightDir_tan_0.z * 8.0, 0.0, 1.0);
 27: diff.rgb += l * lightcolor0;
 28: color = texture2D(diffTex, diffTexCoord.st);
 29: gl_FragColor = color * diff;
 30: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version
Vertex shader source:
  1: #version 110
  2: uniform vec3 light0_direction;
  3: uniform vec3 light0_diffuse;
  4: uniform vec3 light0_specular;
  5: uniform vec3 light0_halfVector;
  6: uniform vec3 eyePosition;
  7: uniform float textureOffset;
  8: vec3 eyeDir = normalize(eyePosition - gl_Vertex.xyz);
  9: float NV = dot(gl_Normal, eyeDir);
 10: varying vec4 diffFactors;
 11: varying vec3 normal;
 12: varying vec3 lightHalfVec0;
 13:
 14: void main(void)
 15: {
 16: float NL;
 17: normal = gl_Normal;
 18: NL = max(0.0, dot(gl_Normal, light0_direction));
 19: diffFactors.x = NL;
 20: lightHalfVec0 = light0_direction + eyeDir;
 21: gl_Position = ftransform();
 22: }

Error compiling vertex shader:
(1) : error C0104: Unknown pre-processor directive #version
Fragment shader source:
  1: #version 110
  2: uniform vec3 ambientColor;
  3: uniform float opacity;
  4: varying vec4 diffFactors;
  5: vec4 diff = vec4(ambientColor, opacity);
  6: varying vec3 normal;
  7: vec4 spec = vec4(0.0);
  8: uniform float shininess;
  9: varying vec3 lightHalfVec0;
 10: uniform vec3 lightcolor0;
 11: uniform vec3 lightspecColor0;
 12:
 13: void main(void)
 14: {
 15: vec4 color;
 16: float NH;
 17: vec3 n = normalize(normal);
 18: diff.rgb += diffFactors.x * lightcolor0;
 19: NH = max(0.0, dot(n, normalize(lightHalfVec0)));
 20: spec.rgb += diffFactors.x * pow(NH, shininess) * lightspecColor0;
 21: color = vec4(1.0, 1.0, 1.0, 1.0);
 22: gl_FragColor = color * diff + spec;
 23: }

Error compiling fragment shader:
(1) : error C0104: Unknown pre-processor directive #version

Posted: 02.06.2007, 21:56
by selden
You need to update your computer's graphics drivers.

Posted: 02.06.2007, 23:52
by PlutonianEmpire
My graphics driver is already upgraded to the max. :(

Posted: 03.06.2007, 01:06
by selden
Exactly what version do you have installed?

You might take a look at the Web page
http://www.fredfred.net/skriker/index.p ... e-drivers/

It claims to make it possible to use the very latest generic drivers from Nvidia. I don't know how true that is, though.

Posted: 03.06.2007, 03:02
by PlutonianEmpire
selden wrote:Exactly what version do you have installed?

You might take a look at the Web page
http://www.fredfred.net/skriker/index.p ... e-drivers/

It claims to make it possible to use the very latest generic drivers from Nvidia. I don't know how true that is, though.

Actually, I don't know what version i have installed. How do I find out? And as for the ForceWare drivers the website suggested you download, I have no idea where, and how, to download them.

Posted: 03.06.2007, 09:31
by cartrite
Assuming your using Windows xp, right click on My Computer and then click on manage and then click on the device manager and then click on display adapters and then click on properties. The 2nd tab is for driver details.

I may be wrong but it looks like the latest driver available for your card is here http://www.nvidia.com/object/winxp_2k_93.71.html

cartrite

Posted: 04.06.2007, 20:34
by chris
The problem reported by PlutonianEmpire is definitely a case of an old graphics driver. In Celestia 1.5.0pre3, all shaders contain the line '#version 110', because it is required for strict GL shading language conformance. Unfortunately, some older drivers don't seem to recognize the version directive, resulting in shader compilation errors.

--Chris

Posted: 04.06.2007, 21:24
by ANDREA
cartrite wrote:....I may be wrong but it looks like the latest driver available for your card is here http://www.nvidia.com/object/winxp_2k_93.71.html
cartrite

No Cartrite, you missed my yesterday's topic http://www.celestiaproject.net/forum/viewtopic ... highlight=
the last one is the 94.24, here :wink:
http://www.nvidia.com/object/winxp_2k_94.24.html
Bye

Andrea :D

Posted: 05.06.2007, 18:31
by PlutonianEmpire
ANDREA wrote:
cartrite wrote:....I may be wrong but it looks like the latest driver available for your card is here http://www.nvidia.com/object/winxp_2k_93.71.html
cartrite
No Cartrite, you missed my yesterday's topic http://www.celestiaproject.net/forum/viewtopic ... highlight=
the last one is the 94.24, here :wink:
http://www.nvidia.com/object/winxp_2k_94.24.html
Bye

Andrea :D

Image

:x :evil: :x :evil: :x :evil: :x :evil: :x :evil:

And, because I'm a gullible fool for following their installation "advice" (http://www.nvidia.com/object/driver_ins ... hints.html), and uninstalling my drivers, I'm now stuck with a ridiculously low screen refresh rate, and my eyes are starting to hurt because of it.

EDIT: Fortunately, I had the dell support website bookmarked, so I was able to re-install the old driver to fix it. :D

Posted: 05.06.2007, 18:41
by t00fri
PlutonianEmpire wrote:Image

:x :evil: :x :evil: :x :evil: :x :evil: :x :evil:

And, because I'm a gullible fool for following their installation "advice" (http://www.nvidia.com/object/driver_ins ... hints.html), and uninstalling my drivers, I'm now stuck with a ridiculously low screen refresh rate, and my eyes are starting to hurt because of it.


Before you start complaining, please note that you were probably mal-informed ...

From that dialog above I conclude that you wanted to update your LAPTOP (right?) with the official NV 94.24 DESKTOP driver. That usually does not work and causes the above dialog. Updating of video drivers for laptops is therefore meant to proceed via the laptop vendor's site (cf your manual!). Often the drivers available there are badly outdated, however...

But there is a workaround:

Instead, for driver updating, you have to go here and use a modified .inf file. I do this all the time with my DELL D620 core2duo latitude notebook.

http://www.laptopvideo2go.com/

I advise, however, that you read the docs first before starting the upgrade (which is simple, once you know how to properly update video drivers in XP. A standard procedure...)

Another piece of know-how that regular Windows users should master is how to roll back drivers. It's all very simple, just requires some base knowledge like most things in life ;-) .

Bye Fridger

Posted: 05.06.2007, 19:03
by PlutonianEmpire
t00fri wrote:
PlutonianEmpire wrote:Image

:x :evil: :x :evil: :x :evil: :x :evil: :x :evil:

And, because I'm a gullible fool for following their installation "advice" (http://www.nvidia.com/object/driver_ins ... hints.html), and uninstalling my drivers, I'm now stuck with a ridiculously low screen refresh rate, and my eyes are starting to hurt because of it.

Before you start complaining, please note that you were probably mal-informed ...

From that dialog above I conclude that you wanted to update your LAPTOP (right?) with the official NV 94.24 DESKTOP driver. That usually does not work and causes the above dialog. Updating of video drivers for laptops is therefore meant to proceed via the laptop vendor's site (cf your manual!). Often the drivers available there are badly outdated, however...

But there is a workaround:

Instead, for driver updating, you have to go here and use a modified .inf file. I do this all the time with my DELL D620 core2duo latitude notebook.

http://www.laptopvideo2go.com/

I advise, however, that you read the docs first before starting the upgrade (which is simple, once you know how to properly update video drivers in XP. A standard procedure...)

Another piece of know-how that regular Windows users should master is how to roll back drivers. It's all very simple, just requires some base knowledge like most things in life ;-) .

Bye Fridger

whoops. :oops: thanks :)

I clicked the link. Now what? do I click the "winXP x86" link or the "winXP x64" link? and How do I know which driver .inf to get?

Posted: 05.06.2007, 19:13
by t00fri
PlutonianEmpire wrote:whoops. :oops: thanks :)

I clicked the link. Now what? do I click the "winXP x86" link or the "winXP x64" link? and How do I know which driver .inf to get?


Study the info! That's why it has been written. Otherwise with too little knowledge, you will fall into another trap...

There are FAQ's and Quickstart manuals that are precisely supposed to answer your questions. No need for me to write another 'essay' here.

Good luck,
Bye Fridger

Posted: 05.06.2007, 19:59
by PlutonianEmpire
t00fri wrote:
PlutonianEmpire wrote:whoops. :oops: thanks :)

I clicked the link. Now what? do I click the "winXP x86" link or the "winXP x64" link? and How do I know which driver .inf to get?

Study the info! That's why it has been written. Otherwise with too little knowledge, you will fall into another trap...

There are FAQ's and Quickstart manuals that are precisely supposed to answer your questions. No need for me to write another 'essay' here.

Good luck,
Bye Fridger

Thanks. I can see the new code working wonders again. :)

Posted: 05.06.2007, 22:52
by PlutonianEmpire
Or not. :(

Celestia was having spurts of severe lag, so I uninstalled the drivers, deleted the "c:\nvidia" folder, and re-installed the latest drivers to try to fix it. Now, all of a sudden, I can no longer switch between render modes, so now i'm stuck at "basic" render mode, meaning no more specular lighting, no more shadows from bump mapping, and no OpenGL 2.0 setting.

Posted: 06.06.2007, 01:06
by tech2000
PlutonianEmpire wrote:Or not. :(

Celestia was having spurts of severe lag, so I uninstalled the drivers, deleted the "c:\nvidia" folder, and re-installed the latest drivers to try to fix it. Now, all of a sudden, I can no longer switch between render modes, so now i'm stuck at "basic" render mode, meaning no more specular lighting, no more shadows from bump mapping, and no OpenGL 2.0 setting.


Then you need to reinstall the drivers again...

Posted: 06.06.2007, 01:24
by Cham
I just made a new compilation from CVS, 10 min ago. The holes on orbital paths are worsth than ever on my system. It's the same bug I reported before, but just to reminds the problem here :

Image

Posted: 06.06.2007, 01:35
by chris
Cham wrote:I just made a new compilation from CVS, 10 min ago. The holes on orbital paths are worsth than ever on my system. It's the same bug I reported before, but just to reminds the problem here :


That looks terrible. When was the last time you built from CVS and didn't see this problem? I can't think of any change I made since pre3 that could be causing this.

I'm still not seeing the problem at all on Windows; I will investigate on my MacBook soon.

--Chris

Posted: 06.06.2007, 01:38
by Cham
Chris,


I'm experiencing this bug since the first versions of Celestia 1.5.0. It's occuring on all my CVS builds, and also on Dirkpitt versions.

I never saw this bug with 1.4.2. It's new with 1.5.0 since a long time ago.

The bug is very easy to reproduce on my system. I just have to select any model (here, it's a simple asteroid) and put it on front. I'm getting the holes on many of the background orbits, if the selected model is on the foreground.

That bug is also occuring with all rendering paths, and even if I desactivate my video card FSAA.

Posted: 01.07.2007, 10:10
by linuxm@n
Hello i have time precision problem on 1.50 pre3:

I'm trying my N1-Lune pack on 1.50 pre3:

http://celestiasws.free.fr/N1-Lune.zip

The N1 rocket must liftoff at this hour 23:00:00 here on celestia 1.41 on this picture
it is 22:59:22

Image

The N1 rocket liftoff at 23:00:00 here on 1.41 on this picture
it is 23:00:03

Image

And now with celestia 150 pre3 the rocket is on the pad at 22:59:17

Image

After one second at 22:59:18 the rocket disappears !

Image

A part of the ssc file used:
# ========================
# Fusee dans le pas de tir
# ========================
"N1-tir" "Sol/Earth"
{
Class "spacecraft"
Mesh "N1-new.3ds"
Radius 0.053298

Beginning "1969 07 03 10:00:00"
Ending "1969 07 03 23:00:00"

LongLat [63.31027 45.79527 0.037] # coord Ba??konour (lat : 45?° 47' 43" (45,79527)long : 63?° 18' 37" (63,31027))

Orientation [45.7957897 1 0 0]
---------------------------------------------------------


How explain this difference ?

I have the same effect with Appolo 11 mission from El Christou.
( I must do calculation orbit for Apollo11 team wiht Andr?©a)

Linuxman

Posted: 01.07.2007, 11:43
by selden
Celestia displays UTC on the screen. UTC is synchronized with the Earth's rotation and includes leap seconds.

Celestia uses TDB internally for all SSC and trajectory calculations. TDB includes no leap seconds. TDB is required for compatibility with SPICE kernels and JPL ephemerides.

There currently is a difference of approximately 1 minute of time between the two time scales.

The difference between the time scales is described on the Web page
http://en.wikibooks.org/wiki/Celestia/Time_Scales