| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
#include "tr_local.h" |
| 24 |
|
| 25 |
int r_firstSceneDrawSurf; |
| 26 |
|
| 27 |
int r_numdlights; |
| 28 |
int r_firstSceneDlight; |
| 29 |
|
| 30 |
int r_numentities; |
| 31 |
int r_firstSceneEntity; |
| 32 |
|
| 33 |
int r_numpolys; |
| 34 |
int r_firstScenePoly; |
| 35 |
|
| 36 |
int r_numpolyverts; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
void R_InitNextFrame( void ) { |
| 46 |
backEndData->commands.used = 0; |
| 47 |
|
| 48 |
r_firstSceneDrawSurf = 0; |
| 49 |
|
| 50 |
r_numdlights = 0; |
| 51 |
r_firstSceneDlight = 0; |
| 52 |
|
| 53 |
r_numentities = 0; |
| 54 |
r_firstSceneEntity = 0; |
| 55 |
|
| 56 |
r_numpolys = 0; |
| 57 |
r_firstScenePoly = 0; |
| 58 |
|
| 59 |
r_numpolyverts = 0; |
| 60 |
} |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
void RE_ClearScene( void ) { |
| 70 |
r_firstSceneDlight = r_numdlights; |
| 71 |
r_firstSceneEntity = r_numentities; |
| 72 |
r_firstScenePoly = r_numpolys; |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
void R_AddPolygonSurfaces( void ) { |
| 91 |
int i; |
| 92 |
shader_t *sh; |
| 93 |
srfPoly_t *poly; |
| 94 |
int fogMask; |
| 95 |
|
| 96 |
tr.currentEntityNum = REFENTITYNUM_WORLD; |
| 97 |
tr.shiftedEntityNum = tr.currentEntityNum << QSORT_REFENTITYNUM_SHIFT; |
| 98 |
fogMask = -((tr.refdef.rdflags & RDF_NOFOG) == 0); |
| 99 |
|
| 100 |
for ( i = 0, poly = tr.refdef.polys; i < tr.refdef.numPolys ; i++, poly++ ) { |
| 101 |
sh = R_GetShaderByHandle( poly->hShader ); |
| 102 |
R_AddDrawSurf( ( void * )poly, sh, poly->fogIndex & fogMask, qfalse, qfalse, 0 ); |
| 103 |
} |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
void RE_AddPolyToScene( qhandle_t hShader, int numVerts, const polyVert_t *verts, int numPolys ) { |
| 113 |
srfPoly_t *poly; |
| 114 |
int i, j; |
| 115 |
int fogIndex; |
| 116 |
fog_t *fog; |
| 117 |
vec3_t bounds[2]; |
| 118 |
|
| 119 |
if ( !tr.registered ) { |
| 120 |
return; |
| 121 |
} |
| 122 |
|
| 123 |
if ( !hShader ) { |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
} |
| 129 |
|
| 130 |
for ( j = 0; j < numPolys; j++ ) { |
| 131 |
if ( r_numpolyverts + numVerts > max_polyverts || r_numpolys >= max_polys ) { |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
ri.Printf( PRINT_DEVELOPER, "WARNING: RE_AddPolyToScene: r_max_polys or r_max_polyverts reached\n"); |
| 139 |
return; |
| 140 |
} |
| 141 |
|
| 142 |
poly = &backEndData->polys[r_numpolys]; |
| 143 |
poly->surfaceType = SF_POLY; |
| 144 |
poly->hShader = hShader; |
| 145 |
poly->numVerts = numVerts; |
| 146 |
poly->verts = &backEndData->polyVerts[r_numpolyverts]; |
| 147 |
|
| 148 |
Com_Memcpy( poly->verts, &verts[numVerts*j], numVerts * sizeof( *verts ) ); |
| 149 |
|
| 150 |
if ( glConfig.hardwareType == GLHW_RAGEPRO ) { |
| 151 |
poly->verts->modulate[0] = 255; |
| 152 |
poly->verts->modulate[1] = 255; |
| 153 |
poly->verts->modulate[2] = 255; |
| 154 |
poly->verts->modulate[3] = 255; |
| 155 |
} |
| 156 |
|
| 157 |
r_numpolys++; |
| 158 |
r_numpolyverts += numVerts; |
| 159 |
|
| 160 |
|
| 161 |
if ( tr.world == NULL ) { |
| 162 |
fogIndex = 0; |
| 163 |
} |
| 164 |
|
| 165 |
else if ( tr.world->numfogs == 1 ) { |
| 166 |
fogIndex = 0; |
| 167 |
} else { |
| 168 |
|
| 169 |
VectorCopy( poly->verts[0].xyz, bounds[0] ); |
| 170 |
VectorCopy( poly->verts[0].xyz, bounds[1] ); |
| 171 |
for ( i = 1 ; i < poly->numVerts ; i++ ) { |
| 172 |
AddPointToBounds( poly->verts[i].xyz, bounds[0], bounds[1] ); |
| 173 |
} |
| 174 |
for ( fogIndex = 1 ; fogIndex < tr.world->numfogs ; fogIndex++ ) { |
| 175 |
fog = &tr.world->fogs[fogIndex]; |
| 176 |
if ( bounds[1][0] >= fog->bounds[0][0] |
| 177 |
&& bounds[1][1] >= fog->bounds[0][1] |
| 178 |
&& bounds[1][2] >= fog->bounds[0][2] |
| 179 |
&& bounds[0][0] <= fog->bounds[1][0] |
| 180 |
&& bounds[0][1] <= fog->bounds[1][1] |
| 181 |
&& bounds[0][2] <= fog->bounds[1][2] ) { |
| 182 |
break; |
| 183 |
} |
| 184 |
} |
| 185 |
if ( fogIndex == tr.world->numfogs ) { |
| 186 |
fogIndex = 0; |
| 187 |
} |
| 188 |
} |
| 189 |
poly->fogIndex = fogIndex; |
| 190 |
} |
| 191 |
} |
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
void RE_AddRefEntityToScene( const refEntity_t *ent ) { |
| 204 |
vec3_t cross; |
| 205 |
|
| 206 |
if ( !tr.registered ) { |
| 207 |
return; |
| 208 |
} |
| 209 |
if ( r_numentities >= MAX_REFENTITIES ) { |
| 210 |
ri.Printf(PRINT_DEVELOPER, "RE_AddRefEntityToScene: Dropping refEntity, reached MAX_REFENTITIES\n"); |
| 211 |
return; |
| 212 |
} |
| 213 |
if ( Q_isnan(ent->origin[0]) || Q_isnan(ent->origin[1]) || Q_isnan(ent->origin[2]) ) { |
| 214 |
static qboolean firstTime = qtrue; |
| 215 |
if (firstTime) { |
| 216 |
firstTime = qfalse; |
| 217 |
ri.Printf( PRINT_WARNING, "RE_AddRefEntityToScene passed a refEntity which has an origin with a NaN component\n"); |
| 218 |
} |
| 219 |
return; |
| 220 |
} |
| 221 |
if ( (int)ent->reType < 0 || ent->reType >= RT_MAX_REF_ENTITY_TYPE ) { |
| 222 |
ri.Error( ERR_DROP, "RE_AddRefEntityToScene: bad reType %i", ent->reType ); |
| 223 |
} |
| 224 |
|
| 225 |
backEndData->entities[r_numentities].e = *ent; |
| 226 |
backEndData->entities[r_numentities].lightingCalculated = qfalse; |
| 227 |
|
| 228 |
CrossProduct(ent->axis[0], ent->axis[1], cross); |
| 229 |
backEndData->entities[r_numentities].mirrored = (DotProduct(ent->axis[2], cross) < 0.f); |
| 230 |
|
| 231 |
r_numentities++; |
| 232 |
} |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
void RE_AddDynamicLightToScene( const vec3_t org, float intensity, float r, float g, float b, int additive ) { |
| 242 |
dlight_t *dl; |
| 243 |
|
| 244 |
if ( !tr.registered ) { |
| 245 |
return; |
| 246 |
} |
| 247 |
if ( r_numdlights >= MAX_DLIGHTS ) { |
| 248 |
return; |
| 249 |
} |
| 250 |
if ( intensity <= 0 ) { |
| 251 |
return; |
| 252 |
} |
| 253 |
|
| 254 |
if ( glConfig.hardwareType == GLHW_RIVA128 || glConfig.hardwareType == GLHW_PERMEDIA2 ) { |
| 255 |
return; |
| 256 |
} |
| 257 |
dl = &backEndData->dlights[r_numdlights++]; |
| 258 |
VectorCopy (org, dl->origin); |
| 259 |
dl->radius = intensity; |
| 260 |
dl->color[0] = r; |
| 261 |
dl->color[1] = g; |
| 262 |
dl->color[2] = b; |
| 263 |
dl->additive = additive; |
| 264 |
} |
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
void RE_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { |
| 273 |
RE_AddDynamicLightToScene( org, intensity, r, g, b, qfalse ); |
| 274 |
} |
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
void RE_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { |
| 283 |
RE_AddDynamicLightToScene( org, intensity, r, g, b, qtrue ); |
| 284 |
} |
| 285 |
|
| 286 |
|
| 287 |
void RE_BeginScene(const refdef_t *fd) |
| 288 |
{ |
| 289 |
Com_Memcpy( tr.refdef.text, fd->text, sizeof( tr.refdef.text ) ); |
| 290 |
|
| 291 |
tr.refdef.x = fd->x; |
| 292 |
tr.refdef.y = fd->y; |
| 293 |
tr.refdef.width = fd->width; |
| 294 |
tr.refdef.height = fd->height; |
| 295 |
tr.refdef.fov_x = fd->fov_x; |
| 296 |
tr.refdef.fov_y = fd->fov_y; |
| 297 |
|
| 298 |
VectorCopy( fd->vieworg, tr.refdef.vieworg ); |
| 299 |
VectorCopy( fd->viewaxis[0], tr.refdef.viewaxis[0] ); |
| 300 |
VectorCopy( fd->viewaxis[1], tr.refdef.viewaxis[1] ); |
| 301 |
VectorCopy( fd->viewaxis[2], tr.refdef.viewaxis[2] ); |
| 302 |
|
| 303 |
tr.refdef.time = fd->time; |
| 304 |
tr.refdef.rdflags = fd->rdflags; |
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
tr.refdef.areamaskModified = qfalse; |
| 309 |
if ( ! (tr.refdef.rdflags & RDF_NOWORLDMODEL) ) { |
| 310 |
int areaDiff; |
| 311 |
int i; |
| 312 |
|
| 313 |
|
| 314 |
areaDiff = 0; |
| 315 |
for (i = 0 ; i < MAX_MAP_AREA_BYTES/4 ; i++) { |
| 316 |
areaDiff |= ((int *)tr.refdef.areamask)[i] ^ ((int *)fd->areamask)[i]; |
| 317 |
((int *)tr.refdef.areamask)[i] = ((int *)fd->areamask)[i]; |
| 318 |
} |
| 319 |
|
| 320 |
if ( areaDiff ) { |
| 321 |
|
| 322 |
tr.refdef.areamaskModified = qtrue; |
| 323 |
} |
| 324 |
} |
| 325 |
|
| 326 |
tr.refdef.sunDir[3] = 0.0f; |
| 327 |
tr.refdef.sunCol[3] = 1.0f; |
| 328 |
tr.refdef.sunAmbCol[3] = 1.0f; |
| 329 |
|
| 330 |
VectorCopy(tr.sunDirection, tr.refdef.sunDir); |
| 331 |
if ( (tr.refdef.rdflags & RDF_NOWORLDMODEL) || !(r_depthPrepass->value) ){ |
| 332 |
VectorSet(tr.refdef.sunCol, 0, 0, 0); |
| 333 |
VectorSet(tr.refdef.sunAmbCol, 0, 0, 0); |
| 334 |
} |
| 335 |
else |
| 336 |
{ |
| 337 |
float scale = (1 << r_mapOverBrightBits->integer) / 255.0f; |
| 338 |
|
| 339 |
if (r_forceSun->integer) |
| 340 |
VectorScale(tr.sunLight, scale * r_forceSunLightScale->value, tr.refdef.sunCol); |
| 341 |
else |
| 342 |
VectorScale(tr.sunLight, scale, tr.refdef.sunCol); |
| 343 |
|
| 344 |
if (r_sunlightMode->integer == 1) |
| 345 |
{ |
| 346 |
tr.refdef.sunAmbCol[0] = |
| 347 |
tr.refdef.sunAmbCol[1] = |
| 348 |
tr.refdef.sunAmbCol[2] = r_forceSun->integer ? r_forceSunAmbientScale->value : tr.sunShadowScale; |
| 349 |
} |
| 350 |
else |
| 351 |
{ |
| 352 |
if (r_forceSun->integer) |
| 353 |
VectorScale(tr.sunLight, scale * r_forceSunAmbientScale->value, tr.refdef.sunAmbCol); |
| 354 |
else |
| 355 |
VectorScale(tr.sunLight, scale * tr.sunShadowScale, tr.refdef.sunAmbCol); |
| 356 |
} |
| 357 |
} |
| 358 |
|
| 359 |
if (r_forceAutoExposure->integer) |
| 360 |
{ |
| 361 |
tr.refdef.autoExposureMinMax[0] = r_forceAutoExposureMin->value; |
| 362 |
tr.refdef.autoExposureMinMax[1] = r_forceAutoExposureMax->value; |
| 363 |
} |
| 364 |
else |
| 365 |
{ |
| 366 |
tr.refdef.autoExposureMinMax[0] = tr.autoExposureMinMax[0]; |
| 367 |
tr.refdef.autoExposureMinMax[1] = tr.autoExposureMinMax[1]; |
| 368 |
} |
| 369 |
|
| 370 |
if (r_forceToneMap->integer) |
| 371 |
{ |
| 372 |
tr.refdef.toneMinAvgMaxLinear[0] = pow(2, r_forceToneMapMin->value); |
| 373 |
tr.refdef.toneMinAvgMaxLinear[1] = pow(2, r_forceToneMapAvg->value); |
| 374 |
tr.refdef.toneMinAvgMaxLinear[2] = pow(2, r_forceToneMapMax->value); |
| 375 |
} |
| 376 |
else |
| 377 |
{ |
| 378 |
tr.refdef.toneMinAvgMaxLinear[0] = pow(2, tr.toneMinAvgMaxLevel[0]); |
| 379 |
tr.refdef.toneMinAvgMaxLinear[1] = pow(2, tr.toneMinAvgMaxLevel[1]); |
| 380 |
tr.refdef.toneMinAvgMaxLinear[2] = pow(2, tr.toneMinAvgMaxLevel[2]); |
| 381 |
} |
| 382 |
|
| 383 |
|
| 384 |
if (fd->rdflags & RDF_EXTRA) { |
| 385 |
const refdefex_t* extra = (const refdefex_t*) (fd+1); |
| 386 |
|
| 387 |
tr.refdef.blurFactor = extra->blurFactor; |
| 388 |
|
| 389 |
if (fd->rdflags & RDF_SUNLIGHT) |
| 390 |
{ |
| 391 |
VectorCopy(extra->sunDir, tr.refdef.sunDir); |
| 392 |
VectorCopy(extra->sunCol, tr.refdef.sunCol); |
| 393 |
VectorCopy(extra->sunAmbCol, tr.refdef.sunAmbCol); |
| 394 |
} |
| 395 |
} |
| 396 |
else |
| 397 |
{ |
| 398 |
tr.refdef.blurFactor = 0.0f; |
| 399 |
} |
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
tr.refdef.floatTime = tr.refdef.time * 0.001; |
| 404 |
|
| 405 |
tr.refdef.numDrawSurfs = r_firstSceneDrawSurf; |
| 406 |
tr.refdef.drawSurfs = backEndData->drawSurfs; |
| 407 |
|
| 408 |
tr.refdef.num_entities = r_numentities - r_firstSceneEntity; |
| 409 |
tr.refdef.entities = &backEndData->entities[r_firstSceneEntity]; |
| 410 |
|
| 411 |
tr.refdef.num_dlights = r_numdlights - r_firstSceneDlight; |
| 412 |
tr.refdef.dlights = &backEndData->dlights[r_firstSceneDlight]; |
| 413 |
|
| 414 |
tr.refdef.numPolys = r_numpolys - r_firstScenePoly; |
| 415 |
tr.refdef.polys = &backEndData->polys[r_firstScenePoly]; |
| 416 |
|
| 417 |
tr.refdef.num_pshadows = 0; |
| 418 |
tr.refdef.pshadows = &backEndData->pshadows[0]; |
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
if ( r_dynamiclight->integer == 0 || |
| 423 |
r_vertexLight->integer == 1 || |
| 424 |
glConfig.hardwareType == GLHW_PERMEDIA2 ) { |
| 425 |
tr.refdef.num_dlights = 0; |
| 426 |
} |
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
tr.frameSceneNum++; |
| 434 |
tr.sceneCount++; |
| 435 |
} |
| 436 |
|
| 437 |
|
| 438 |
void RE_EndScene(void) |
| 439 |
{ |
| 440 |
|
| 441 |
r_firstSceneDrawSurf = tr.refdef.numDrawSurfs; |
| 442 |
r_firstSceneEntity = r_numentities; |
| 443 |
r_firstSceneDlight = r_numdlights; |
| 444 |
r_firstScenePoly = r_numpolys; |
| 445 |
} |
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
void RE_RenderScene( const refdef_t *fd ) { |
| 459 |
viewParms_t parms; |
| 460 |
int startTime; |
| 461 |
|
| 462 |
if ( !tr.registered ) { |
| 463 |
return; |
| 464 |
} |
| 465 |
GLimp_LogComment( "====== RE_RenderScene =====\n" ); |
| 466 |
|
| 467 |
if ( r_norefresh->integer ) { |
| 468 |
return; |
| 469 |
} |
| 470 |
|
| 471 |
startTime = ri.Milliseconds(); |
| 472 |
|
| 473 |
if (!tr.world && !( fd->rdflags & RDF_NOWORLDMODEL ) ) { |
| 474 |
ri.Error (ERR_DROP, "R_RenderScene: NULL worldmodel"); |
| 475 |
} |
| 476 |
|
| 477 |
RE_BeginScene(fd); |
| 478 |
|
| 479 |
|
| 480 |
if (!( fd->rdflags & RDF_NOWORLDMODEL ) && tr.refdef.num_dlights && r_dlightMode->integer >= 2) |
| 481 |
{ |
| 482 |
R_RenderDlightCubemaps(fd); |
| 483 |
} |
| 484 |
|
| 485 |
|
| 486 |
if(glRefConfig.framebufferObject && !( fd->rdflags & RDF_NOWORLDMODEL ) && r_shadows->integer == 4) |
| 487 |
{ |
| 488 |
R_RenderPshadowMaps(fd); |
| 489 |
} |
| 490 |
|
| 491 |
|
| 492 |
if(glRefConfig.framebufferObject && r_sunlightMode->integer && !( fd->rdflags & RDF_NOWORLDMODEL ) && (r_forceSun->integer || tr.sunShadows)) |
| 493 |
{ |
| 494 |
if (r_shadowCascadeZFar->integer != 0) |
| 495 |
{ |
| 496 |
R_RenderSunShadowMaps(fd, 0); |
| 497 |
R_RenderSunShadowMaps(fd, 1); |
| 498 |
R_RenderSunShadowMaps(fd, 2); |
| 499 |
} |
| 500 |
else |
| 501 |
{ |
| 502 |
Mat4Zero(tr.refdef.sunShadowMvp[0]); |
| 503 |
Mat4Zero(tr.refdef.sunShadowMvp[1]); |
| 504 |
Mat4Zero(tr.refdef.sunShadowMvp[2]); |
| 505 |
} |
| 506 |
|
| 507 |
|
| 508 |
if (r_forceSun->integer == 2 || !VectorCompare(tr.refdef.sunDir, tr.lastCascadeSunDirection)) |
| 509 |
{ |
| 510 |
VectorCopy(tr.refdef.sunDir, tr.lastCascadeSunDirection); |
| 511 |
R_RenderSunShadowMaps(fd, 3); |
| 512 |
Mat4Copy(tr.refdef.sunShadowMvp[3], tr.lastCascadeSunMvp); |
| 513 |
} |
| 514 |
else |
| 515 |
{ |
| 516 |
Mat4Copy(tr.lastCascadeSunMvp, tr.refdef.sunShadowMvp[3]); |
| 517 |
} |
| 518 |
} |
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
if (0) |
| 523 |
{ |
| 524 |
int i, j; |
| 525 |
|
| 526 |
for (i = 0; i < tr.numCubemaps; i++) |
| 527 |
{ |
| 528 |
for (j = 0; j < 6; j++) |
| 529 |
{ |
| 530 |
R_RenderCubemapSide(i, j, qtrue); |
| 531 |
} |
| 532 |
} |
| 533 |
} |
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
Com_Memset( &parms, 0, sizeof( parms ) ); |
| 542 |
parms.viewportX = tr.refdef.x; |
| 543 |
parms.viewportY = glConfig.vidHeight - ( tr.refdef.y + tr.refdef.height ); |
| 544 |
parms.viewportWidth = tr.refdef.width; |
| 545 |
parms.viewportHeight = tr.refdef.height; |
| 546 |
parms.isPortal = qfalse; |
| 547 |
|
| 548 |
parms.fovX = tr.refdef.fov_x; |
| 549 |
parms.fovY = tr.refdef.fov_y; |
| 550 |
|
| 551 |
parms.stereoFrame = tr.refdef.stereoFrame; |
| 552 |
|
| 553 |
VectorCopy( fd->vieworg, parms.or.origin ); |
| 554 |
VectorCopy( fd->viewaxis[0], parms.or.axis[0] ); |
| 555 |
VectorCopy( fd->viewaxis[1], parms.or.axis[1] ); |
| 556 |
VectorCopy( fd->viewaxis[2], parms.or.axis[2] ); |
| 557 |
|
| 558 |
VectorCopy( fd->vieworg, parms.pvsOrigin ); |
| 559 |
|
| 560 |
if(!( fd->rdflags & RDF_NOWORLDMODEL ) && r_depthPrepass->value && ((r_forceSun->integer) || tr.sunShadows)) |
| 561 |
{ |
| 562 |
parms.flags = VPF_USESUNLIGHT; |
| 563 |
} |
| 564 |
|
| 565 |
R_RenderView( &parms ); |
| 566 |
|
| 567 |
if(!( fd->rdflags & RDF_NOWORLDMODEL )) |
| 568 |
R_AddPostProcessCmd(); |
| 569 |
|
| 570 |
RE_EndScene(); |
| 571 |
|
| 572 |
tr.frontEndMsec += ri.Milliseconds() - startTime; |
| 573 |
} |