mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Fixed viewInsideSurface check which caused much flickering
This commit is contained in:
parent
d747be22d6
commit
06c6dd0e4a
4 changed files with 29 additions and 8 deletions
|
@ -2,16 +2,19 @@
|
|||
bind "I" "toggle r_showSurfaceInfo"
|
||||
bind "N" "noclip"
|
||||
bind "M" "spawn moveable_macbethchart"
|
||||
bind "O" "toggle r_useMaskedOcclusionCulling"
|
||||
bind "P" "toggle r_showPortals"
|
||||
|
||||
// bind "F1" "toggle r_showViewEnvprobes 1 2 0"
|
||||
bind "F1" "editLights"
|
||||
bind "F2" "toggle r_showTris 1 2 0"
|
||||
bind "F3" "toggle r_forceAmbient 0.5 1.0 0"
|
||||
bind "F3" "toggle r_forceAmbient 0.3 0.5 1.0 0"
|
||||
bind "F4" "toggle r_skipInteractions"
|
||||
bind "F5" "savegame quick"
|
||||
//bind "F6" "toggle r_showLightGrid 1 3 4 0"
|
||||
// bind "F6" "toggle r_showLightGrid 1 3 4 0"
|
||||
bind "F6" "toggle r_renderMode 0 1 3 5 7 9 11"
|
||||
bind "F7" "toggle r_renderMode 0 1 2 3 4 5 6 7 8 9 10 11"
|
||||
bind "F8" "toggle r_useCRTPostFX 0 1 2 3"
|
||||
bind "F9" "loadgame quick"
|
||||
//bind "F10" "toggle com_fixedTic"
|
||||
// bind "F10" "toggle com_fixedTic"
|
||||
bind "F11" "toggle r_useFilmicPostFX"
|
||||
|
|
|
@ -388,6 +388,11 @@ void idRenderBackend::DBG_RenderDrawSurfListWithFunction( drawSurf_t** drawSurfs
|
|||
|
||||
RB_SetMVP( drawSurf->space->mvp );
|
||||
}
|
||||
|
||||
// give every surface a different color
|
||||
//static idVec4 colors[] = { colorRed, colorGreen, colorBlue, colorYellow, colorMagenta, colorCyan, colorWhite, colorPurple };
|
||||
//GL_Color( colors[i & 7] );
|
||||
//GL_Color( colors[drawSurf->ambientCache & 7] );
|
||||
#else
|
||||
|
||||
if( drawSurf->space != NULL ) // is it ever NULL? Do we need to check?
|
||||
|
@ -423,10 +428,12 @@ void idRenderBackend::DBG_RenderDrawSurfListWithFunction( drawSurf_t** drawSurfs
|
|||
|
||||
if( drawSurf->jointCache )
|
||||
{
|
||||
GL_Color( colorRed );
|
||||
renderProgManager.BindShader_ColorSkinned();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL_Color( colorCyan );
|
||||
renderProgManager.BindShader_Color();
|
||||
}
|
||||
// RB end
|
||||
|
|
|
@ -371,7 +371,7 @@ void idRenderWorldLocal::AddAreaViewLights( int areaNum, const portalStack_t* ps
|
|||
|
||||
// debug tool to allow viewing of only one light at a time
|
||||
// RB: use this elsewhere in the backend debug drawing code
|
||||
#if 1
|
||||
#if 0
|
||||
if( r_singleLight.GetInteger() >= 0 && r_singleLight.GetInteger() != light->index )
|
||||
{
|
||||
continue;
|
||||
|
|
|
@ -677,11 +677,22 @@ void R_AddSingleModel( viewEntity_t* vEntity )
|
|||
// RB: added check wether GPU skinning is available at all
|
||||
const bool gpuSkinned = ( tri->staticModelWithJoints != NULL && r_useGPUSkinning.GetBool() );
|
||||
|
||||
#if defined(USE_INTRINSICS_SSE)
|
||||
idRenderMatrix cullSurfaceProject;
|
||||
idRenderMatrix::InverseOffsetScaleForBounds( renderMatrix_identity, tri->bounds, cullSurfaceProject );
|
||||
//const char* shaderName = shader->GetName();
|
||||
//if( idStr::Cmp( shaderName, "textures/rock/sharprock_dark") == 0 )
|
||||
//{
|
||||
// tr.pc.c_mocTests += 0;
|
||||
//}
|
||||
|
||||
const bool viewInsideSurface = !idRenderMatrix::CullPointToMVP( cullSurfaceProject, localViewOrigin, false );
|
||||
#if defined(USE_INTRINSICS_SSE)
|
||||
|
||||
const bool viewInsideSurface = tri->bounds.ContainsPoint( localViewOrigin );
|
||||
|
||||
//if( viewInsideSurface && idStr::Cmp( shaderName, "models/weapons/berserk/fist") != 0 )
|
||||
//{
|
||||
// tr.pc.c_mocTests += 1;
|
||||
//
|
||||
// tr.viewDef->renderWorld->DebugBounds( colorCyan, tri->bounds, renderEntity->origin );
|
||||
//}
|
||||
|
||||
// RB: test surface visibility by drawing the triangles of the bounds
|
||||
if( r_useMaskedOcclusionCulling.GetBool() && !viewInsideSurface && !viewDef->isMirror && !viewDef->isSubview )
|
||||
|
|
Loading…
Reference in a new issue