mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Don't let TAA mess with masked culling
This commit is contained in:
parent
1fda97ec25
commit
dba7404eff
2 changed files with 8 additions and 6 deletions
|
@ -529,6 +529,7 @@ void R_AddSingleModel( viewEntity_t* vEntity )
|
|||
idRenderMatrix viewMat;
|
||||
idRenderMatrix::Transpose( *( idRenderMatrix* )vEntity->modelViewMatrix, viewMat );
|
||||
idRenderMatrix::Multiply( viewDef->projectionRenderMatrix, viewMat, vEntity->mvp );
|
||||
idRenderMatrix::Multiply( viewDef->unjitteredProjectionRenderMatrix, viewMat, vEntity->unjitteredMVP );
|
||||
if( renderEntity->weaponDepthHack )
|
||||
{
|
||||
idRenderMatrix::ApplyDepthHack( vEntity->mvp );
|
||||
|
@ -714,9 +715,9 @@ void R_AddSingleModel( viewEntity_t* vEntity )
|
|||
const idDrawVert& v2 = tri->verts[tri->indexes[i + 2]];
|
||||
|
||||
// transform to clip space
|
||||
vEntity->mvp.TransformPoint( idVec4( v0.xyz.x, v0.xyz.y, v0.xyz.z, 1 ), triVerts[0] );
|
||||
vEntity->mvp.TransformPoint( idVec4( v1.xyz.x, v1.xyz.y, v1.xyz.z, 1 ), triVerts[1] );
|
||||
vEntity->mvp.TransformPoint( idVec4( v2.xyz.x, v2.xyz.y, v2.xyz.z, 1 ), triVerts[2] );
|
||||
vEntity->unjitteredMVP.TransformPoint( idVec4( v0.xyz.x, v0.xyz.y, v0.xyz.z, 1 ), triVerts[0] );
|
||||
vEntity->unjitteredMVP.TransformPoint( idVec4( v1.xyz.x, v1.xyz.y, v1.xyz.z, 1 ), triVerts[1] );
|
||||
vEntity->unjitteredMVP.TransformPoint( idVec4( v2.xyz.x, v2.xyz.y, v2.xyz.z, 1 ), triVerts[2] );
|
||||
|
||||
MaskedOcclusionCulling::CullingResult result = tr.maskedOcclusionCulling->TestTriangles( ( float* )triVerts, triIndices, 1, NULL, MaskedOcclusionCulling::BACKFACE_CCW );
|
||||
if( result == MaskedOcclusionCulling::VISIBLE )
|
||||
|
|
|
@ -266,6 +266,7 @@ void R_RenderSingleModel( viewEntity_t* vEntity )
|
|||
idRenderMatrix viewMat;
|
||||
idRenderMatrix::Transpose( *( idRenderMatrix* )vEntity->modelViewMatrix, viewMat );
|
||||
idRenderMatrix::Multiply( viewDef->projectionRenderMatrix, viewMat, vEntity->mvp );
|
||||
idRenderMatrix::Multiply( viewDef->unjitteredProjectionRenderMatrix, viewMat, vEntity->unjitteredMVP );
|
||||
if( renderEntity->weaponDepthHack )
|
||||
{
|
||||
idRenderMatrix::ApplyDepthHack( vEntity->mvp );
|
||||
|
@ -436,9 +437,9 @@ void R_RenderSingleModel( viewEntity_t* vEntity )
|
|||
const idDrawVert& v2 = tri->verts[tri->indexes[i + 2]];
|
||||
|
||||
// transform to clip space
|
||||
vEntity->mvp.TransformPoint( idVec4( v0.xyz.x, v0.xyz.y, v0.xyz.z, 1 ), triVerts[0] );
|
||||
vEntity->mvp.TransformPoint( idVec4( v1.xyz.x, v1.xyz.y, v1.xyz.z, 1 ), triVerts[1] );
|
||||
vEntity->mvp.TransformPoint( idVec4( v2.xyz.x, v2.xyz.y, v2.xyz.z, 1 ), triVerts[2] );
|
||||
vEntity->unjitteredMVP.TransformPoint( idVec4( v0.xyz.x, v0.xyz.y, v0.xyz.z, 1 ), triVerts[0] );
|
||||
vEntity->unjitteredMVP.TransformPoint( idVec4( v1.xyz.x, v1.xyz.y, v1.xyz.z, 1 ), triVerts[1] );
|
||||
vEntity->unjitteredMVP.TransformPoint( idVec4( v2.xyz.x, v2.xyz.y, v2.xyz.z, 1 ), triVerts[2] );
|
||||
|
||||
// tri->indexes is unsigned short instead of uint
|
||||
//triIndices[0] = tri->indexes[i + 0];
|
||||
|
|
Loading…
Reference in a new issue