Page 1 of 1

r634 Sprites too bright under certain conditions

Posted: Wed Nov 25, 2009 23:34
by Enjay
Probably best to put this in a new thread. As reported elsewhere, in Doom lighting mode and in the presence of dynamic lights, sprites can get bright (too bright) as you get close to them.

Here's a test map:
toobright.zip
(534 Bytes) Downloaded 144 times
Here are screenshots of how it looks for me.

Stating out - as expected:
Image

Getting closer - already too bright:
Image

Up close and personal and waaaay too bright
Image

Again, this only happens in Doom lighting mode. All other modes are fine.

and the video I recorded:

http://www.zen64060.zen.co.uk/dynamicsprites.wmv

In the video, as I approach the demon corpse in Doom lighting mode, it gets brighter than it should. Then I try all the other lighting modes and they do not show the problem. Finally, back in Doom mode, I have a quick look at a few other sprites to show that it happens pretty commonly on a level that uses lots of dynamic lights.

As I said, I'm sure that I have seen a similar effect on decals too occasionally.

Re: r634 Sprites too bright under certain conditions

Posted: Wed Nov 25, 2009 23:43
by Enjay
Thought... am I right in saying that Doom mode is the only lighting mode that has the "glowing player effect"? You know, the one that makes things brighter when the player gets closer. If so, could that be related? Perhaps the glowing player effect is being added to the illumination from the dynamic light or something?

Re: r634 Sprites too bright under certain conditions

Posted: Wed Nov 25, 2009 23:43
by Graf Zahl
Same problem as your other bug so I'm moving this right away.

Yes, it's caused by that effect but I don't know how yet.

Re: r634 Sprites too bright under certain conditions

Posted: Wed Nov 25, 2009 23:47
by Enjay
Oops, sorry for double reporting. I had remembered about that other report but I somehow had it in mind that it had been fixed already. Oh well, at least the simple map shows the bug rather than having to use a much more complicated map to do it.

Re: r634 Sprites too bright under certain conditions

Posted: Thu Nov 26, 2009 0:03
by Graf Zahl
Sadly it doesn't. It works fine for me...

Re: r634 Sprites too bright under certain conditions

Posted: Thu Nov 26, 2009 0:24
by Graf Zahl
I also can't reproduce this in the other mod anymore. Can it be a driver issue? Which version are you using?

Re: r634 Sprites too bright under certain conditions

Posted: Thu Nov 26, 2009 0:27
by Enjay
191.07

Re: r634 Sprites too bright under certain conditions

Posted: Thu Nov 26, 2009 1:20
by Enjay
Graf Zahl wrote:Sadly it doesn't. It works fine for me...
:?

Just in case, I'm sure that you will have tried these but the only other options that I think have an effect are:

Dynamic lights should be set to affect sprites. I guess that's an obvious one but, naturally, if this option is off, I don't see the effect.

Fog needs to be enabled. Either radial or standard will do. Both cause the problem. Switching fog to off stops the effect happening.

Re: r634 Sprites too bright under certain conditions

Posted: Sun Nov 29, 2009 11:51
by Enjay
Not that this will be a surprise, but it is still happening in r641. I tried the test map using my older machine (which has the shader menu - so I tried lots of different options) and was unable to get the effect.

I know that you are trying to push towards a release but it would be a shame to release a version with this problem if it can be tracked down somehow. Personally, I like Doom lighting mode but this bug can make things quite distracting. It isn't obvious some of the time. In maps with higher levels of lighting the increase in sprite/decal brightness is less obvious but it does catch your eye every now and again. Imagine creeping down a dark corridor and something a bit bright catches your eye - was it an enemy? No, it was just a slightly luminescent blood splat on the wall. :? Would it be possible to even have some kind of work around - for example a cvar that disables the player-glow effect (which is the only thing about Doom mode that I don't really like anyway)?

Is there anything I can do to give more information about this? I'll post a startup log below to see if that gives any clues.

[spoiler]

Code: Select all

Log started: Sun Nov 29 10:42:14 2009

W_Init: Init WADfiles.
 adding C:/Doom/gzdoomSVN/gzdoom.pk3, 538 lumps
 adding C:/Doom/gzdoom/doom2.wad, 2951 lumps
 adding C:/Users/Nigel/Desktop/toobright.zip, 1 lumps
 adding C:/Users/Nigel/Desktop/toobright.zip:toobright.wad, 14 lumps
I_Init: Setting up machine state.
CPU Speed: 2673 MHz
CPU Vendor ID: GenuineIntel
  Name: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
  Family 6, Model 26, Stepping 4
  Features: MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
I_InitSound: Initializing FMOD
FMOD Sound System, copyright © Firelight Technologies Pty, Ltd., 1994-2009.
Loaded FMOD version 4.26.10
V_Init: allocate screen.
S_Init: Setting up sound.
ST_Init: Init startup screen.
P_Init: Checking cmd-line parameters...
G_ParseMapInfo: Load map definitions.
S_InitData: Load sound definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
M_Init: Init miscellaneous info.
P_Init: Init Playloop state.
ParseSBarInfo: Loading default status bar definition.
ParseSBarInfo: Loading custom status bar definition.
D_CheckNetGame: Checking network game status.
player 1 of 1 (1 nodes)
I_InitInput
I_StartupMouse
I_StartupKeyboard
I_StartupXInput
I_StartupRawPS2
I_StartupDirectInputJoystick
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce GTX 285/PCI/SSE2
GL_VERSION: 3.2.0
GL_SHADING_LANGUAGE_VERSION: 1.50 NVIDIA via Cg compiler
GL_EXTENSIONS: GL_ARB_color_buffer_float GL_ARB_compatibility GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_fragment_coord_conventions GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_map_buffer_range 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_provoking_vertex GL_ARB_seamless_cube_map GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_sync GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_compression GL_ARB_texture_compression_rgtc 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_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object 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_bindable_uniform 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_depth_bounds_test GL_EXT_direct_state_access 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_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_object 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_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_shader_objects 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_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_conditional_render GL_NV_copy_depth_to_color GL_NV_copy_image GL_NV_depth_buffer_float GL_NV_depth_clamp GL_NV_explicit_multisample 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_coverage GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_parameter_buffer_object GL_NV_parameter_buffer_object2 GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_shader_buffer_load GL_NV_texgen_reflection GL_NV_texture_barrier 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_transform_feedback2 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_buffer_unified_memory 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 
WGL_EXTENSIONS: (null)
Max. texture units: 32
Max. fragment uniforms: 2048
Max. vertex uniforms: 4096
Max. varying: 60
Max. combined uniforms: 198656
Max. combined uniform blocks: 36
Support for non power 2 textures enabled.
Occlusion query enabled.
Resolution: 1920 x 1200
16 bots read from bots.cfg



MAP01 - entryway

ACS scripts unloaded.
[/spoiler]



Can I ask other people to try the file attached to my first post above to see if they get the problem and report back? Aside from anything else, I'd like to know how common the problem is.

Re: r634 Sprites too bright under certain conditions

Posted: Sun Nov 29, 2009 12:08
by Graf Zahl
Can you please post your INI? I'd like to test this under identical conditions as you used.

Re: r634 Sprites too bright under certain conditions

Posted: Sun Nov 29, 2009 12:30
by Enjay
OK, I'm aware that my ini is a bit of a mess, so I trimmed out a lot of the irrelevant stuff put there by previous configurations and left behind only the stuff that is relevant to a game of Doom (I think). Anyway, starting GZdoom with toobright.wad loaded and using the attached ini shows the problem for me. I'll fire up my old computer and see what happens with it when using the same ini. [edit] Not surprisingly, my old machine does not show the problem when using this ini.[/edit]

Re: r634 Sprites too bright under certain conditions

Posted: Sun Nov 29, 2009 12:39
by Graf Zahl
Success! With that INI I get the error, too. Now I need to find out which setting it is...

Re: r634 Sprites too bright under certain conditions

Posted: Sun Nov 29, 2009 13:17
by Graf Zahl
At least for this WAD is's working better now.

What happened was that due to the extremely low ambient light level you had set some calculations yielded abnormally large values and needed to be clamped to a more reasonable range.

But please keep in mind that an ambient light level below ca. 25 with Doom lighting mode will not be that great. Several calculations were tuned for an ambient range between 25 and 35.

Re: r634 Sprites too bright under certain conditions

Posted: Sun Nov 29, 2009 15:14
by Enjay
Much better, much more natural, much more like it should be and the lighting ramp looks better now too.

I have upped my ambient light level as well. With r641, the effect was still quite noticeable for me with an increased ambient light level, but certainly not as strong as it was at my original setting. However, at a variety of ambient light levels in various WADs where I had the problem before, r643 looks good.

Amusingly, I guess, the only reason that I had my ambient light set that low was because I had been messing with it once and forgot what the default setting was so I had just set it to a level that I thought looked OK in the WAD that I was playing at the time and then just forgot that I had ever changed it.

Anyway, thanks for addressing this. :)

Re: r634 Sprites too bright under certain conditions

Posted: Sun Nov 29, 2009 15:39
by Graf Zahl
I redid the fix in r644. The first attempt only cured the symptoms but didn't fix the problem with improper light values being used for some calculations.