Hi Ahruman, sorry for the delay i wondered off to watch the 'Live Earth' gig. Well this is odd, since i changed my graphics card from an ATI to a nvidia one i've just found out that a lot of the shader stuff i was working on in rendermonkey no longer compile properly giving errors similar to the ones in the log below, this must be the fault of my new graphics card as these were working before. drat, i'll try a different graphics driver (i've got a beta one installed at the moment)
Code: Select all
2007-07-07 22:48:13.000 oolite.exe[1336] File NSUserDefaults.m: 544. In [NSUserDefaults +standardUserDefaults] Improper installation: No language locale found
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: initialising SDL
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.JoystickHandler]: init: numSticks=1
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: CREATING MODE LIST
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Unknown architecture, defaulting to 1024x768
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 1280 x 1024
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 1152 x 864
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 1024 x 768
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 800 x 600
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 640 x 480
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 512 x 384
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 480 x 360
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 400 x 300
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Added res 320 x 240
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Found mode {Height = 1024; RefreshRate = 0; Width = 1280; }
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: drawRect calling initialiseGLWithSize
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: Creating a new surface of 1280 x 1024
2007-07-07 22:48:13.000 oolite.exe[1336] [unclassified.MyOpenGLView]: no universe, clearning surface
2007-07-07 22:48:13.000 oolite.exe[1336] [cpuInfo.cpuCount]: 2 processors detected.
2007-07-07 22:48:13.000 oolite.exe[1336] [rendering.opengl.version]: OpenGL renderer version: 2.1.1 ("2.1.1")
Vendor: NVIDIA Corporation
Renderer: GeForce 8800 GTS/PCI/SSE2
2007-07-07 22:48:13.000 oolite.exe[1336] [rendering.opengl.extensions]: OpenGL extensions (145):
GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_bindable_uniform GL_EXT_depth_bounds_test GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_EXT_timer_query GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_buffer_float GL_NV_conditional_render GL_NV_depth_clamp GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_geometry_shader4 GL_NV_gpu_program4 GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_parameter_buffer_object GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_transform_feedback GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_EXT_swap_control
2007-07-07 22:48:13.000 oolite.exe[1336] [dataCache.found]: Found data cache.
2007-07-07 22:48:13.000 oolite.exe[1336] [searchPaths.dumpAll]: ---> OXP search paths:
(oolite.app/Resources, AddOns, "AddOns/Freaky Thargoids 3.oxp", AddOns/glow_alloy_mod.oxp, AddOns/Griff_shaded_cargopod.oxp, AddOns/supercobra.oxp)
2007-07-07 22:48:13.000 oolite.exe[1336] [dataCache.upToDate]: Data cache is up to date.
2007-07-07 22:48:13.000 oolite.exe[1336] [script.load.world.listAll]: Loaded 7 world scripts: "oolite-cloaking-device" 1.69, "oolite-constrictor-hunt" 1.69, "oolite-nova" 1.69, "oolite-thargoid-plans" 1.69, "oolite-trumbles" 1.69, "Spawn-griff_cargopod" 1.0.1, "supercobra_placement"
2007-07-07 22:48:14.000 oolite.exe[1336] [dataCache.willWrite]: About to write data cache.
2007-07-07 22:48:14.000 oolite.exe[1336] [dataCache.write.success]: Wrote data cache.
2007-07-07 22:48:14.000 oolite.exe[1336] [rendering.opengl.error]: OpenGL error: "invalid enumerant" (1280), context: Universe before doing anything
2007-07-07 22:48:20.000 oolite.exe[1336] [testscript.spawn]: Generated 6 griff_cargopod for testing purposes.
2007-07-07 22:48:41.000 oolite.exe[1336] [shader.compile.fragment.failure]: ***** GLSL fragment shader compilation failed:
>>>>> GLSL log:
(78) : error C0000: syntax error, unexpected "+=" at token "+="
(78) : error C0501: type name expected at token "+="
(78) : warning C7022: unrecognized profile specifier "diffuse"
(78) : warning C7528: OpenGL reserves names starting with 'gl_'
(78) : error C1307: non constant expression for array size
(78) : warning C7528: OpenGL reserves names starting with 'gl_'
(78) : error C0000: syntax error, unexpected '.', expecting ';' or ',' at token "."
(78) : error C0501: type name expected at token "."
(78) : error C0000: syntax error, unexpected '(' at token "("
(78) : error C0501: type name expected at token "("
(78) : warning C7022: unrecognized profile specifier "dot"
(78) : error C0000: syntax error, unexpected ')' at token ")"
(78) : error C0501: type name expected at token ")"
(78) : warning C7022: unrecognized profile specifier "lightVector"
(79) : error C1307: non constant expression for array size
(79) : error C0000: syntax error, unexpected '.', expecting ',' or ')' at token "."
(79) : error C0501: type name expected at token "."
(79) : error C0000: syntax error, unexpected '(' at token "("
(79) : error C0501: type name expected at token "("
(79) : warning C7022: unrecognized profile specifier "max"
(79) : error C0000: syntax error, unexpected ',' at token ","
(79) : error C0501: type name expected at token ","
(79) : warning C7022: unrecognized profile specifier "reflection"
(79) : error C1109: function type not allowed for parameter "dot"
(79) : error C0000: syntax error, unexpected floating point constant at token "<undefined>"
(79) : error C0501: type name expected at token "<undefined>"
(79) : error C1109: function type not allowed for parameter "pow"
(84) : error C1109: function type not allowed for parameter "main"
(84) : error C0000: syntax error, unexpected '{', expecting ',' or ')' at token "{"
(84) : error C0501: type name expected at token "{"
(85) : error C0000: syntax error, unexpected '=' at token "="
(85) : error C0501: type name expected at token "="
(85) : warning C7022: unrecognized profile specifier "specular"
(85) : error C1109: function type not allowed for parameter "vec4"
(86) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(86) : error C0501: type name expected at token ";"
(89) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(89) : error C0501: type name expected at token ";"
(90) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(90) : error C0501: type name expected at token ";"
(91) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(91) : error C0501: type name expected at token ";"
(92) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(92) : error C0501: type name expected at token ";"
(93) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(93) : error C0501: type name expected at token ";"
(107) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(107) : error C0501: type name expected at token ";"
(107) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(107) : error C0501: type name expected at token ";"
(110) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(110) : error C0501: type name expected at token ";"
(112) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(112) : error C0501: type name expected at token ";"
(113) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(113) : error C0501: type name expected at token ";"
(115) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(115) : error C0501: type name expected at token ";"
(116) : error C0000: syntax error, unexpected '*' at token "*"
(116) : error C0501: type name expected at token "*"
(116) : warning C7022: unrecognized profile specifier "metalTemperature"
(116) : error C1109: function type not allowed for parameter "MetalGlow"
(119) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(119) : error C0501: type name expected at token ";"
(120) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(120) : error C0501: type name expected at token ";"
(121) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(121) : error C0501: type name expected at token ";"
(122) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(122) : error C0501: type name expected at token ";"
(124) : error C0000: syntax error, unexpected ')' at token ")"
(124) : error C0501: type name expected at token ")"
(124) : warning C7022: unrecognized profile specifier "FinalTemperature"
(126) : error C0000: syntax error, unexpected ';', expecting ',' or ')' at token ";"
(126) : error C0501: type name expected at token ";"
>>>>> GLSL source code:
#define OO_ENGINE_LEVEL 1
#define OO_TIME 1
#define OO_ENTITY_PERSONALITY 1
#define OO_TEXTURE_UNIT_COUNT 4
#define OO_HULL_HEAT_LEVEL 1
#define OO_ENTITY_LASER_HEAT_LEVEL 1
#define OO_USER_DEFINED_BINDINGS 1
#define OO_ENTITY_PERSONALITY_INT 1
// Information from Oolite.
uniform sampler2D tex0;
uniform sampler2D tex1;
uniform float time;
uniform float timeElapsedSinceSpawn;
const float kInitialHeat = 1.3;
const float kFadeTime = 5.0; // seconds
const float kFadeFactor = kInitialHeat / kFadeTime;
// Information from vertex shader.
varying vec3 v_normal; // Surface normal
varying vec3 v_pos; // Vertex/fragment position in eye space
// Calculates the levels of R, G & B that make up the glow effect (MetalGlow), going from black through reddish-brown/dark orange to yellow-white. Red channel in effects map png proportional to level of effect.
vec4 MetalGlow(float level)
{
vec4 result;
result.r = level;
result.g = level * level;
result.b = max(level - 0.55, 0.0) * 2.0;
result.a = 1.0;
return result;
}
#define OO_REDUCED_COMPLEXITY
#ifdef OO_REDUCED_COMPLEXITY
#define Pulse(v, ts) ((v) * 0.95)
#else
float Pulse(float value, float timeScale)
{
float t = time * timeScale; // multiplier on end of this line increases the flicker effect
float s0 = t;
s0 -= floor(s0);
float sum = abs( s0 - 0.5);
float s1 = t * 1.7 - 0.05;
s1 -= floor(s1);
sum += abs(s1 - 0.5);
float s2 = t * 2.3 - 0.3;
s2 -= floor(s2);
sum += abs(s2 - 0.5);
float s3 = t * 5.09;
s3 -= floor(s3);
sum += abs(s3 - 0.5);
return (sum * 0.25) * value;
}
#endif
// 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 ColorMap = texture2D(tex0, texCoord);
vec4 EffectsMap = texture2D(tex1, texCoord); // multiplier on the end of this line to intensify the heat effect. Add if range clamped between 0.0 & 1.0 does not produce enough 'heat'
float specExponent = EffectsMap.b * 200.0 + 1.0;
float specIntensity = EffectsMap.g * 1.2;
/* Light 0 is the "showroom" light, used in the demo screen and shipyard.
Light 0 is currently disabled, because there's no way for the shader
to know when it's turned off. The solution for this will probably be
for Oolite to set its diffuse and specular components to black when
it's not being used. When this is done, Oolite will define
OO_LIGHT_0_FIX.
Light 1 is the sun.
*/
#ifdef OO_LIGHT_0_FIX
LIGHT(0);
#endif
LIGHT(1);
diffuse += gl_FrontMaterial.ambient * gl_LightModel.ambient;
vec4 color = diffuse * ColorMap + specular * specIntensity;
float HeatAlphaR = EffectsMap.r * 2.0; // add a multiplier to this line to intensify the effect
float HeatAlphaB = EffectsMap.r * 0.05; // add a multiplier to this line to intensify the effect
float metalTemperature = max(0.0, kInitialHeat - kFadeFactor * timeElapsedSinceSpawn);
color += MetalGlow(metalTemperature * HeatAlphaR + HeatAlphaB);
// ...and heat effects
float Heat = max(metalTemperature - 0.5, 0.0) * 2.0;
Heat = Pulse(metalTemperature, 0.1);
float Heat2 = Pulse(metalTemperature, 0.5);
float FinalTemperature = ((Heat + metalTemperature * HeatAlphaR) * HeatAlphaB) + ((Heat2 + metalTemperature * HeatAlphaB) * HeatAlphaR); // put a "/ HeatAlphaR" at end of this line, makes a coole effect (originally it was "* HeatAlphaR"
color += MetalGlow(FinalTemperature);
gl_FragColor = vec4(color.rgb, 1.0);
}
That's only part of the log, i was using a cargo canister with a death action to spawn 6 alloys and the above was repeated in the log for each spawned alloy, i guess you only need to see the error for one.