ec- / Quake3e

Improved Quake III Arena engine
GNU General Public License v2.0
1.21k stars 154 forks source link

Dithering issues on certain surfaces #91

Open Riccardoman opened 3 years ago

Riccardoman commented 3 years ago

It happens so far in Q3WC4 from q3wpak2 shot-20210215-004405 Q3W8 from q3wpak3 shot-20210215-004742 My ported QL map beyondreality shot-20210214-175535

I recorded the demos demos.zip

no dithering with vanilla exe for q3wc4 and q3w8 As seen in the screenshots I tried modded and unmodded

Riccardoman commented 3 years ago

Also is it normal that each time I teleport the screen flashes white for a frame or two? I'm having issues also with the spawn after loading a level, sometimes for a frame or two after the loading screen the display shows an aerial view of the map, or a view from a different position, then after those frames the player spawns and everything looks normal

Tested both in vanilla and modded

ec- commented 3 years ago

is a known behavior: those portals shows uninitialized framebuffer data which looks different than in opengl on nvidia systems

Riccardoman commented 3 years ago

What about the teleport/spawn behavior?

ec- commented 3 years ago

White splash is a desired behavior controlled by RDF_HYPERSPACE flag from mod side, not sure about your aerial view - can it bee captured by any tool?

Riccardoman commented 3 years ago

Is there a way to make that flash black or dark gray instead of white?

For the spawn, do you have any suggestions for a recording software capable of easily recording at high fps to make sure it captures the issue?

And about the uninitialized framebuffer, can it be fixed?

ec- commented 3 years ago

Uninitialized framebuffer can be fixed but it will have negative performance impact for everything (which is not acceptable counting that this is nvidia-only behavior and not engine flaw)

To modify portal effect - look in RB_Hyperspace()

For capture you may try OBS or even built-in windows recording

Riccardoman commented 3 years ago

Could you give more specific instructions for RB_Hyperspace()? I'm not a coder. Thank you Is this the line?

static void RB_Hyperspace( void ) { float c;

if ( !backEnd.isHyperspace ) {
    // do initialization shit
}

c = ( backEnd.refdef.time & 255 ) / 255.0f;
qglClearColor( c, c, c, 1 );
qglClear( GL_COLOR_BUFFER_BIT );

backEnd.isHyperspace = qtrue;

}

In what file is this? For the black color should I change this "qglClearColor( c, c, c, 1 )" to "qglClearColor( c, c, c, 0 )"?

ec- commented 3 years ago

For black color it should be qglClearColor( 0, 0, 0, 1 );, no need for c as variable at all

Riccardoman commented 3 years ago

What file should I edit? Hex or text editor?

Another last weird issue: Bots stutter for one second after loading a map or after I unpause

ec- commented 3 years ago

What file you should edit for what?

Bots issue is related to gamecode and networking (latency negotiation)

Riccardoman commented 3 years ago

In which file can I find RB_Hyperspace?

Also another issue: once in a while I get a stutter, and it's unpredictable. I've noticed that it happens more in certain quake live maps that I ported. I have a system much capable of running the game fluidly. But I have many custom assets inside one pk3, approx 17000 textures. Could that be the culprit?

ec- commented 3 years ago

Unpredictable stuttering in 95% cases comes from unpredictable environment (e.g. your system), there is no known flaws in engine that may cause that

To search for functions and more - install and use Visual Studio community edition, that's a thing you should do in first order