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