OGL 2.0 Bug in 1.4 pre 2

Report bugs, bug fixes and workarounds here.
Topic author
Commander David
Posts: 73
Joined: 27.06.2002
With us: 22 years 4 months
Location: Germany
Contact:

OGL 2.0 Bug in 1.4 pre 2

Post #1by Commander David » 27.10.2004, 10:24

Hi Chris,

i`ve installed and tested the new prerelease and the OpenGL 2.0 Path is not working correctly on my GraKa.

Here`s a Screenshot:

Image

My Sys:

Athlon XP Barton 2800+@2.4GHz
Windows XP SP2
ATI Radeon 9500 non PRO 128MB
ATI Catalyst 4.10
Screenresolution 1360x1020px 32bpp

OGL Info:
Vendor: ATI Technologies Inc.

Renderer: RADEON 9500 x86/MMX/3DNow!/SSE

Version: 1.5.4650 WinXP Release
Max simultaneous textures: 8
Max texture size: 2048

Supported Extensions:

GL_ARB_multitexture
GL_EXT_texture_env_add
GL_EXT_compiled_vertex_array
GL_S3_s3tc
GL_ARB_depth_texture
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_multisample
GL_ARB_occlusion_query
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_shader_objects
GL_ARB_shading_language_100
GL_ARB_shadow
GL_ARB_shadow_ambient
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_crossbar
GL_ARB_texture_env_dot3
GL_ARB_texture_mirrored_repeat
GL_ARB_transpose_matrix
GL_ARB_vertex_blend
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_window_pos
GL_ATI_draw_buffers
GL_ATI_element_array
GL_ATI_envmap_bumpmap
GL_ATI_fragment_shader
GL_ATI_map_object_buffer
GL_ATI_separate_stencil
GL_ATI_texture_env_combine3
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_ATI_vertex_array_object
GL_ATI_vertex_attrib_array_object
GL_ATI_vertex_streams
GL_ATIX_texture_env_combine3
GL_ATIX_texture_env_route
GL_ATIX_vertex_shader_output_point_size
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_multi_draw_arrays
GL_EXT_packed_pixels
GL_EXT_point_parameters
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shadow_funcs
GL_EXT_stencil_wrap
GL_EXT_texgen_reflection
GL_EXT_texture3D
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_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_vertex_array
GL_EXT_vertex_shader
GL_HP_occlusion_test
GL_NV_texgen_reflection
GL_NV_blend_square
GL_NV_occlusion_query
GL_SGI_color_matrix
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_border_clamp
GL_SGIS_texture_lod
GL_SGIS_generate_mipmap
GL_SGIS_multitexture
GL_SUN_multi_draw_arrays
GL_WIN_swap_hint
WGL_EXT_extensions_string
WGL_EXT_swap_control
Celestia on my System:
AMD Barton 2800+@3000+
1024 MB DDR-RAM
ATI Radeon 9500 non Pro 128MB
_________________
However if God is a mistake, then I do not regret anything. More worth living than this mistake did not give it.

Kolano

Post #2by Kolano » 27.10.2004, 15:02

I'm experiencing the same thing with 1.4pre2...

Error Log (using celestia.exe>err.log):

Code: Select all

Error getting joystick caps.
Initializing ARB vertex programs . . .
Loading ARB vertex program: shaders/diffuse_arb.vp
Loading ARB vertex program: shaders/specular_arb.vp
Loading ARB vertex program: shaders/haze_arb.vp
Loading ARB vertex program: shaders/bumpdiffuse_arb.vp
Loading ARB vertex program: shaders/bumphaze_arb.vp
Loading ARB vertex program: shaders/shadowtex_arb.vp
Loading ARB vertex program: shaders/diffuse_texoff_arb.vp
Loading ARB vertex program: shaders/rings_arb.vp
Loading ARB vertex program: shaders/ringshadow_arb.vp
Loading ARB vertex program: shaders/night_arb.vp
Loading ARB vertex program: shaders/glossmap_arb.vp
Loading ARB vertex program: shaders/diffuse2_arb.vp
Loading ARB vertex program: shaders/haze2_arb.vp
Loading ARB vertex program: shaders/diffuse_texoff2_arb.vp
Loading ARB vertex program: shaders/specular2_arb.vp
Loading ARB vertex program: shaders/night2_arb.vp
Loading ARB vertex program: shaders/multishadow_arb.vp
Loading ARB vertex program: shaders/texphong_arb.vp
Loading ARB vertex program: shaders/texphong_alpha_arb.vp
All ARB vertex programs loaded successfully.
render path: 3
Saving preferences . . .
Opened registry key

Shader.log:

Code: Select all

Vertex shader source:
  1: struct {
  2:    vec3 direction;
  3:    vec3 diffuse;
  4:    vec3 specular;
  5:    vec3 halfVector;
  6: } uniform lights[1];
  7: uniform float shininess;
  8: varying vec4 spec;
  9: varying vec2 diffTexCoord;
 10: varying vec2 normTexCoord;
 11: varying vec3 lightDir0;
 12: varying vec2 specTexCoord;
 13: varying vec2 nightTexCoord;
 14: varying float totalLight;
 15: attribute vec3 tangent;
 16:
 17: void main(void)
 18: {
 19: float nDotVP;
 20: float nDotHV;
 21: nDotVP = max(0.0, dot(gl_Normal, lights[0].direction));
 22: nDotHV = max(0.0, dot(gl_Normal, lights[0].halfVector));
 23: spec += vec4(lights[0].specular * (pow(nDotHV, shininess) * nDotVP), 0.0);
 24: totalLight += nDotVP;
 25: totalLight = 1 - totalLight;
 26: totalLight = totalLight * totalLight * totalLight * totalLight;
 27: vec3 bitangent = cross(gl_Normal, tangent);
 28: lightDir0.x = dot(tangent, lights[0].direction);
 29: lightDir0.y = dot(-bitangent, lights[0].direction);
 30: lightDir0.z = dot(gl_Normal, lights[0].direction);
 31: diffTexCoord = gl_MultiTexCoord0.st;
 32: normTexCoord = gl_MultiTexCoord1.st;
 33: specTexCoord = gl_MultiTexCoord2.st;
 34: nightTexCoord = gl_MultiTexCoord3.st;
 35: gl_Position = ftransform();
 36: }

Error compiling vertex shader:
ERROR: 0:6: 'uniform' : syntax error parse error
Fragment shader source:
  1: uniform vec3 ambientColor;
  2: vec4 diff = vec4(ambientColor, 1);
  3: uniform vec3 lightcolor0;
  4: uniform vec3 lightspecColor0;
  5: varying vec4 spec;
  6: varying vec2 diffTexCoord;
  7: uniform sampler2D diffTex;
  8: varying vec2 normTexCoord;
  9: varying vec3 lightDir0;
 10: uniform sampler2D normTex;
 11: varying vec2 specTexCoord;
 12: uniform sampler2D specTex;
 13: varying vec2 nightTexCoord;
 14: uniform sampler2D nightTex;
 15: varying float totalLight;
 16:
 17: void main(void)
 18: {
 19: vec4 color;
 20: vec3 n = texture2D(normTex, normTexCoord.st).xyz * 2.0 - vec3(1.0, 1.0, 1.0);
 21: float l;
 22: l = max(0.0, dot(lightDir0, n)) * clamp(lightDir0.z * 8.0, 0.0, 1.0);
 23: diff += vec4(l * lightcolor0, 0.0);
 24: color = texture2D(diffTex, diffTexCoord.st);
 25: gl_FragColor = color * diff + texture2D(specTex, specTexCoord.st) * spec;
 26: gl_FragColor += texture2D(nightTex, nightTexCoord.st) * totalLight;
 27: }

Vertex shader source:
  1: struct {
  2:    vec3 direction;
  3:    vec3 diffuse;
  4:    vec3 specular;
  5:    vec3 halfVector;
  6: } uniform lights[1];
  7: varying vec2 diffTexCoord;
  8: varying vec2 normTexCoord;
  9: varying vec3 lightDir0;
 10: attribute vec3 tangent;
 11:
 12: void main(void)
 13: {
 14: float nDotVP;
 15: nDotVP = max(0.0, dot(gl_Normal, lights[0].direction));
 16: vec3 bitangent = cross(gl_Normal, tangent);
 17: lightDir0.x = dot(tangent, lights[0].direction);
 18: lightDir0.y = dot(-bitangent, lights[0].direction);
 19: lightDir0.z = dot(gl_Normal, lights[0].direction);
 20: diffTexCoord = gl_MultiTexCoord0.st;
 21: normTexCoord = gl_MultiTexCoord1.st;
 22: gl_Position = ftransform();
 23: }

Error compiling vertex shader:
ERROR: 0:6: 'uniform' : syntax error parse error
Fragment shader source:
  1: uniform vec3 ambientColor;
  2: vec4 diff = vec4(ambientColor, 1);
  3: uniform vec3 lightcolor0;
  4: varying vec2 diffTexCoord;
  5: uniform sampler2D diffTex;
  6: varying vec2 normTexCoord;
  7: varying vec3 lightDir0;
  8: uniform sampler2D normTex;
  9:
 10: void main(void)
 11: {
 12: vec4 color;
 13: vec3 n = texture2D(normTex, normTexCoord.st).xyz * 2.0 - vec3(1.0, 1.0, 1.0);
 14: float l;
 15: l = max(0.0, dot(lightDir0, n)) * clamp(lightDir0.z * 8.0, 0.0, 1.0);
 16: diff += vec4(l * lightcolor0, 0.0);
 17: color = texture2D(diffTex, diffTexCoord.st);
 18: gl_FragColor = color * diff;
 19: }


System:
SMP Athlon MP 2600+, 1.5G RAM, ATI 9800 AIW
Windows XP SP2, 8.07 Catalyst Drivers (bug fix between 4.10 and 4.11)

Kolano

Post #3by Kolano » 27.10.2004, 15:04

I forgot to give my OpenGL info:

Code: Select all

Vendor: ATI Technologies Inc.
Renderer: RADEON 9800 Pro x86/MMX/3DNow!/SSE
Version: 1.5.4702 WinXP Release
Max simultaneous textures: 8
Max texture size: 2048

Supported Extensions:
GL_ARB_multitexture
GL_EXT_texture_env_add
GL_EXT_compiled_vertex_array
GL_S3_s3tc
GL_ARB_depth_texture
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_multisample
GL_ARB_occlusion_query
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_shader_objects
GL_ARB_shading_language_100
GL_ARB_shadow
GL_ARB_shadow_ambient
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_crossbar
GL_ARB_texture_env_dot3
GL_ARB_texture_mirrored_repeat
GL_ARB_transpose_matrix
GL_ARB_vertex_blend
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_window_pos
GL_ATI_draw_buffers
GL_ATI_element_array
GL_ATI_envmap_bumpmap
GL_ATI_fragment_shader
GL_ATI_map_object_buffer
GL_ATI_pn_triangles
GL_ATI_separate_stencil
GL_ATI_texture_env_combine3
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_ATI_vertex_array_object
GL_ATI_vertex_attrib_array_object
GL_ATI_vertex_streams
GL_ATIX_texture_env_combine3
GL_ATIX_texture_env_route
GL_ATIX_vertex_shader_output_point_size
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_multi_draw_arrays
GL_EXT_packed_pixels
GL_EXT_point_parameters
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_shadow_funcs
GL_EXT_stencil_wrap
GL_EXT_texgen_reflection
GL_EXT_texture3D
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_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_vertex_array
GL_EXT_vertex_shader
GL_HP_occlusion_test
GL_NV_texgen_reflection
GL_NV_blend_square
GL_NV_occlusion_query
GL_SGI_color_matrix
GL_SGIS_texture_edge_clamp
GL_SGIS_texture_border_clamp
GL_SGIS_texture_lod
GL_SGIS_generate_mipmap
GL_SGIS_multitexture
GL_SUN_multi_draw_arrays
GL_WIN_swap_hint
WGL_EXT_extensions_string
WGL_EXT_swap_control

Avatar
piellepi M
Posts: 124
Joined: 25.09.2003
Age: 69
With us: 21 years 2 months
Location: Rome, Italy

Post #4by piellepi » 28.10.2004, 16:27

Hi Celestians!

I'm having the same problems with my ATI 9600 graphic card.
I have the newest ATI drivers (4.10) and my favorite OpenGL benchmark test says that my card is fully compliant with OpenGL 2.0.
In spite of these facts Celestia doesn't work in OpenGL 2.0 mode (pressing Ctrl-V a couple of times in my PC).

So I was going to create a new Topic with this title

"Simply Red" :lol: :lol: :lol:

just because the earth and the moon (the only planets I cheched!) become completely and simply ... red. 8O 8O 8O
But you were faster than me! :)

Today at office I downloaded the latest .vp and .fp shaders files from CVS, just to see if at home everything works. :?

Thanks for your attention
Pierluigi

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #5by chris » 28.10.2004, 17:59

Hmm . . . another slight difference between ATI's and NVIDIA's GLSL parsers. It's an easy fix; I'll have a patched version ready later today.

The red color is deliberate--it's meant to indicate in an obvious way that there's a problem with the shaders. The OpenGL 2.0 path doesn't use the .fp and .vp files in the shaders directory. Instead, shaders for different lighting situations and surface properties are constructed at run time by Celestia.

--Chris


Return to “Bugs”