View Issue Details

IDProjectCategoryView StatusLast Update
0004418The Dark ModSaving/Loadingpublic17.04.2017 08:14
Reporterduzenko Assigned Toduzenko  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.06Fixed in VersionTDM 2.06 
Summary0004418: Save performance-affecting cvars
DescriptionDepth capture is costly but not used on low-end configs.
Make r_skipDepthCapture save to .cfg so that it does not need to be disabled each run.
Same applies to r_clear.
TagsNo tags attached.

Activities

duzenko

duzenko

21.11.2016 06:54

developer   ~0008512

Fire does not render without depth capture: torches, firehead skeletons
nbohr1more

nbohr1more

21.11.2016 07:32

developer   ~0008513

That's probably because you need to disable soft particles too?

other than that I guess it could be that the ARB shaders for heathaze now use depth so you'd need to create a parm to enable different heathaze ARB depending on its state akin to the old enhanced ambient setup.
duzenko

duzenko

21.11.2016 12:26

developer   ~0008518

r_useSoftParticles 0 does bring the fire back for me
nbohr1more

nbohr1more

21.11.2016 19:11

developer   ~0008522

Last edited: 21.11.2016 20:05

Probably best to set r_useSoftParticles to CVAR ARCHIVE too and ensure that it only works when depth capture is set.

Eg. tr_light.cpp

if ( r_useSoftParticles.GetBool() && !r_skipDepthCapture.GetBool()
                && !shader->ReceivesLighting() // don't soften surfaces that are meant to be solid
                && tr.viewDef->renderView.viewID >= TR_SCREEN_VIEW_ID ) // Skip during "invisible" rendering passes (e.g. lightgem)
            {
                const idRenderModelPrt* prt = dynamic_cast<const idRenderModelPrt*>( def->parms.hModel );
                if ( prt )
                {
                    particle_radius = prt->SofteningRadius( surf->id );
                }
}


(Probably best left for 2.06) As for water\heathaze, here is what I was proposing:

{
    if (global8 == 1) // depth fix. slower but looks better

       vertexProgram HeatHazeWithMaskAndDepth.vfp
        // 0.1 * 0.4 => 0.04
        vertexParm 0 time * ((( parm5 + 0.1) - (( parm5 || 0) * 0.1)) * 0.4), time * ((( parm5 + 0.1) - (( parm5 || 0) * 0.1)) * 2)
        vertexParm 1 (( parm6 + 1.5) - (( parm6 || 0) * 1.5))
        fragmentProgram HeatHazeWithMaskAndDepth.vfp
        fragmentMap 0 _currentRender
        fragmentMap 1 textures/sfx/vp1
        fragmentMap 2 textures/water_source/vp_water
        fragmentMap 3 _currentDepth
    }

{
        if (global8 == 0) // no depth fix

        vertexProgram HeatHazeWithMask.vfp
        // 0.1 * 0.4 => 0.04
        vertexParm 0 time * ((( parm5 + 0.1) - (( parm5 || 0) * 0.1)) * 0.4), time * ((( parm5 + 0.1) - (( parm5 || 0) * 0.1)) * 2)
        vertexParm 1 (( parm6 + 1.5) - (( parm6 || 0) * 1.5))
        fragmentProgram HeatHazeWithMask.vfp
        fragmentMap 0 _currentRender
        fragmentMap 1 textures/sfx/vp1
        fragmentMap 2 textures/water_source/vp_water
        
    }

We'd need to alter all materials that use the _currentDepth image and toggle the global similar to idPlayerView::UpdateAmbientLight in PlayerView.cpp

duzenko

duzenko

22.11.2016 13:38

developer   ~0008524

Added CVAR ARCHIVE to r_useSoftParticles
What is the meaning of this operator: parm5 || 0?
nbohr1more

nbohr1more

22.11.2016 14:07

developer   ~0008525

The material will move the water if a parm value is present. If the parm is not present it reverts to hard-coded behavior. Hence the OR ( || ) operator.

I don't think it's needed but I didn't design the material.

That was just an example of the type of material def we'd need to alter to allow fallback to no depth capture.
duzenko

duzenko

22.11.2016 14:17

developer   ~0008526

Umm...
Where can I see the impact of depth capture on materials? I.e. map name/place?
nbohr1more

nbohr1more

22.11.2016 14:46

developer   ~0008527

I'll try to get you concrete examples when I can but until then, the v2.03 release video shows the two primary uses:

https://www.youtube.com/watch?v=WDuDW6TwnZo

Soft Particles and correcting water shaders to prevent foreground objects from being included in the distortion.

Any mission with water (No Honor Among Thieves) or lots of Soft Particles (Lord Edgar's Bathhouse) will see changes due to depth.
duzenko

duzenko

22.11.2016 15:30

developer   ~0008528

Last edited: 22.11.2016 15:43

Looking at Lich Queen Demise - r_softparticle 0 does enough IMO. Torches are ok. Water is "old", but still ok IMO.
...
As for steam/smoke I'm thinking about extending the r_skipTranslucent cvar to skip those altogether (at level 2).

nbohr1more

nbohr1more

22.11.2016 15:48

developer   ~0008529

Good, it seems that no new materials are needed then. Except for the fact that some GPU's don't like the shaders. But we can consider helping those users in 2.06.
duzenko

duzenko

22.11.2016 15:55

developer   ~0008530

Last edited: 22.11.2016 17:15

Hmm.. I'm not a shader expert but our glprogs look rather primitve.
AFAIK ARB assembler was designed for hardware that became obsolete a while ago.
With no branches or transcendental functions, these shaders can't be a problem for modern GPU's - and I have Intel!
I.e. nvidia 7600gt had 12 pixel pipelines and 12 fragment shaders.
Intel 5500 has 4 ROPs and 96 universal shaders.
...
Looking at Lord Edgar's Bathhouse there only place with steam is ventilation tunnel. Same thing there - "old" look with hard particles and no depth capture.

duzenko

duzenko

17.04.2017 08:14

developer   ~0008801

Archived flag tdm_ai_opt_nolipsync

Issue History

Date Modified Username Field Change
18.11.2016 13:15 duzenko New Issue
18.11.2016 13:15 duzenko Status new => assigned
18.11.2016 13:15 duzenko Assigned To => duzenko
21.11.2016 06:54 duzenko Note Added: 0008512
21.11.2016 07:32 nbohr1more Note Added: 0008513
21.11.2016 12:26 duzenko Note Added: 0008518
21.11.2016 19:11 nbohr1more Note Added: 0008522
21.11.2016 19:14 nbohr1more Note Edited: 0008522
21.11.2016 20:05 nbohr1more Note Edited: 0008522
22.11.2016 13:38 duzenko Note Added: 0008524
22.11.2016 14:07 nbohr1more Note Added: 0008525
22.11.2016 14:17 duzenko Note Added: 0008526
22.11.2016 14:46 nbohr1more Note Added: 0008527
22.11.2016 15:30 duzenko Note Added: 0008528
22.11.2016 15:43 duzenko Note Edited: 0008528
22.11.2016 15:48 nbohr1more Note Added: 0008529
22.11.2016 15:55 duzenko Note Added: 0008530
22.11.2016 15:57 duzenko Note Edited: 0008530
22.11.2016 17:15 duzenko Note Edited: 0008530
22.11.2016 22:06 nbohr1more Product Version => SVN
22.11.2016 22:06 nbohr1more Target Version => TDM 2.05
25.11.2016 13:55 grayman Target Version TDM 2.05 => TDM 2.06
01.04.2017 07:01 duzenko Status assigned => resolved
01.04.2017 07:01 duzenko Fixed in Version => TDM 2.06
01.04.2017 07:01 duzenko Resolution open => fixed
17.04.2017 08:14 duzenko Note Added: 0008801