Finally a fix for an old tenebrae problem

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Finally a fix for an old tenebrae problem

Postby revelator » Wed Mar 29, 2017 5:43 pm

Anyone remember the old problem with tenebrae where the viewmodel would poke through walls and if you enabled depthtesting it broke shadows ?.
Well i fixed it :) and its not even hard.

Open up the solution and search for R_ShouldDrawViewModel, this should pop up quite a few places.

then modify all of those instances to look like this

Code: Select all
    if (R_ShouldDrawViewModel())
        if (gl_calcdepth.value)
            glDepthRange (gldepthmin, gldepthmin + 0.1f * (gldepthmax - gldepthmin));
        R_DrawAliasObjectLight(&cl.viewent, R_DrawAliasBumped);

        if (gl_calcdepth.value)
            //Calc Depth - Eradicator
            glDepthRange (gldepthmin, gldepthmax);

set the cvar gl_calcdepth to 1 as default and recompile the engine, lean back and enjoy tenebrae without this age old bug :).
Productivity is a state of mind.
User avatar
Posts: 2593
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest