mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 08:11:10 +02:00
Fixed RR sets motion ids correctly.
This commit is contained in:
@@ -1576,6 +1576,7 @@ enum GeometryFlag_t
|
||||
};
|
||||
|
||||
void APIENTRY glGeometryFlagf(GLfloat flag);
|
||||
void APIENTRY glMotionObjectIdui(GLuint objectId);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -118,6 +118,19 @@ static float RB_EstimatePathTraceSpecularStrength( const idMaterial *shader, con
|
||||
return idMath::ClampFloat( 0.5f, 2.4f, strength );
|
||||
}
|
||||
|
||||
static GLuint RB_PathTraceMotionObjectId( const drawSurf_t *surf ) {
|
||||
if ( !surf || !surf->space || !surf->space->entityDef ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const int entityIndex = surf->space->entityDef->index;
|
||||
if ( entityIndex < 0 ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return (GLuint)( entityIndex + 2 );
|
||||
}
|
||||
|
||||
static idDrawVert *RB_BindAmbientBuffer( const srfTriangles_t *tri ) {
|
||||
if ( tri->ambientVbo ) {
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, tri->ambientVbo );
|
||||
@@ -654,6 +667,7 @@ void RB_T_FillDepthBuffer(const drawSurf_t* surf) {
|
||||
else {
|
||||
glGeometryFlagf(GEOMETRY_FLAG_SKELETAL);
|
||||
}
|
||||
glMotionObjectIdui( RB_PathTraceMotionObjectId( surf ) );
|
||||
|
||||
// set texture matrix and texGens. The Quake 4 path needs to know this is a depth fill.
|
||||
RB_PrepareStageTexturing(pStage, surf, ac);
|
||||
@@ -683,6 +697,7 @@ void RB_T_FillDepthBuffer(const drawSurf_t* surf) {
|
||||
GL_SelectTexture(0);
|
||||
globalImages->BindNull();
|
||||
|
||||
glMotionObjectIdui(0);
|
||||
if (alphaTestWasEnabled) {
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
Reference in New Issue
Block a user