PDA

View Full Version : [Graphics] Mini-freeze when first seeing a spell



bg
02-23-2012, 05:40 PM
When first seeing a spell being cast in-game, the game will freeze for about 1/4 of a second. It happens every game, every time, though the impact might be greater with some spells than others. Plague extinguish and Vindicator curse are two that for sure have an effect (I might test others conclusively when I have time). This has been happening for at least a few months now, and I don't remember it being a problem long before. I feel like it definitely has an impact on playability because it happens during important combat sequences. It certainly gets irritating.

I have a rather fast computer, so lack of hardware isn't the problem. Relevant specs:
- i7 quad core with hyperthreading at 4GHz
- 12GB DDR3 RAM
- ATI 5850 video card, using latest proprietary Catalyst drivers
- Arch Linux 64bit, up to date (edit: also happens in Win7 64bit in OpenGL mode)
- Corsair Force 3 160GB SSD (latest firmware)

I have a likely lead regarding the cause. I just recreated the freezes in practice mode and watched the console. When the freeze happens, a bunch of GLSL shaders have to be compiled, which obviously takes some time. A simple fix would be to compile all shaders relevant to the current game during load time rather than in-game.

If you want a console log, I can post one later, though I'll paste some of the lines that happen during the spellcast:

Compiling pixel shader: mesh_color_lightmap.psh (ps_glsl)
Linking shaders: mesh_color.vsh and mesh_color_lightmap.psh (glsl)
Compiling pixel shader: mesh_color_unit_team.psh (ps_glsl)
Linking shaders: mesh_color_unit.vsh and mesh_color_unit_team.psh (glsl)
Compiling pixel shader: mesh_color_flat_lightmap.psh (ps_glsl)
Linking shaders: mesh_color_flat.vsh and mesh_color_flat_lightmap.psh (glsl)
Compiling pixel shader: terrain_color.psh (ps_glsl)
Linking shaders: terrain_color.vsh and terrain_color.psh (glsl)
Compiling pixel shader: mesh_color_lightmap.psh (ps_glsl)
Linking shaders: mesh_color.vsh and mesh_color_lightmap.psh (glsl)
Compiling pixel shader: mesh_color.psh (ps_glsl)
Linking shaders: mesh_color.vsh and mesh_color.psh (glsl)
Linking shaders: mesh_color.vsh and mesh_color_lightmap.psh (glsl)
Compiling pixel shader: mesh_color_unit_team.psh (ps_glsl)
Linking shaders: mesh_color_unit.vsh and mesh_color_unit_team.psh (glsl)
Compiling pixel shader: foliage_color.psh (ps_glsl)
Linking shaders: foliage_color.vsh and foliage_color.psh (glsl)
Compiling pixel shader: terrain_color.psh (ps_glsl)
Linking shaders: terrain_color.vsh and terrain_color.psh (glsl)
Compiling vertex shader: mesh_depth_opacity.vsh (vs_glsl)
Compiling pixel shader: mesh_depth_opacity.psh (ps_glsl)
Linking shaders: mesh_depth_opacity.vsh and mesh_depth_opacity.psh (glsl)
Linking shaders: mesh_color_unit.vsh and mesh_color_unit_team.psh (glsl)
Compiling pixel shader: mesh_depth_opacity.psh (ps_glsl)
Linking shaders: mesh_depth_opacity.vsh and mesh_depth_opacity.psh (glsl)
Linking shaders: mesh_color_unit.vsh and mesh_color_unit_team.psh (glsl)
Compiling pixel shader: mesh_depth_opacity.psh (ps_glsl)
Linking shaders: mesh_depth_opacity.vsh and mesh_depth_opacity.psh (glsl)
Linking shaders: mesh_color_unit.vsh and mesh_color_unit_team.psh (glsl)

edit: Here's the log: http://tools.heroesofnewerth.com/view.php?key=914c5e451e279783&action=download

Evil_Andrex
02-23-2012, 05:54 PM
I'll leave this here but still post in technical support they might be capable of finding some incompatabilities.

bg
02-23-2012, 05:57 PM
Here's a full console.log: http://tools.heroesofnewerth.com/view.php?key=914c5e451e279783&action=download

I put in some "echo" statements in the console before/after spellcasts so the problem areas can easily be seen. I now see that some spells require compiling more shaders than others, and those cause longer freezes. Some spells don't require compiling shaders (like torturer stun when I tested in practice) and those don't cause a freeze.

Also probably needless to mention, but this is with OpenGL, and it may only happen with OpenGL, which would explain why it's not noticed by most players.

bg
02-23-2012, 08:36 PM
All of the previous things I said were under high graphics settings. I just tested on the same computer in Windows with OpenGL, and the same thing happens. Then I tested it on a different computer with an NVidia video card. On high settings, the same thing happens. On low settings, it doesn't happen, and there's no messages in console about shaders compiling. So it seems to be related to quality settings. Also, on this other slower computer, casting vindi's curse freezes for like a whole second, so it's a pretty severe problem.

Evil_Andrex
02-23-2012, 09:35 PM
I have a nvidia card and I don't lag on max setting, I hope you posted in tech support.

bg
02-24-2012, 12:11 AM
Yea, I posted there too. Are you in OpenGL mode though?

Evil_Andrex
02-24-2012, 09:51 AM
Yes I purposely changed to check.

Naib
02-26-2012, 07:33 AM
I can confirm this and this is partly downto the unoptimised usage of OGL in HoN.
This is partly why, for nvidia users, the 290.* and beyond drivers were so good, nvidia drivers cache compiled textures between launches.

I know this doesn't help you as an ATi user.