}
// just check if each leaf in the PVS is on screen
// (unless portal culling is enabled)
- else if (r_useportalculling.integer < 1 || (r_useportalculling.integer < 2 && !r_novis.integer))
+ else if (!model->brush.data_portals || r_useportalculling.integer < 1 || (r_useportalculling.integer < 2 && !r_novis.integer))
{
// pvs method:
// simply check if each leaf is in the Potentially Visible Set,
info.pvs = NULL;
R_UpdateAllTextureInfo(ent);
- if (r_shadow_frontsidecasting.integer && r_shadow_compilingrtlight && r_shadow_realtime_world_compileportalculling.integer)
+ if (r_shadow_frontsidecasting.integer && r_shadow_compilingrtlight && r_shadow_realtime_world_compileportalculling.integer && info.model->brush.data_portals)
{
// use portal recursion for exact light volume culling, and exact surface checking
Portal_Visibility(info.model, info.relativelightorigin, info.outleaflist, info.outleafpvs, &info.outnumleafs, info.outsurfacelist, info.outsurfacepvs, &info.outnumsurfaces, NULL, 0, true, info.lightmins, info.lightmaxs, info.outmins, info.outmaxs, info.outshadowtrispvs, info.outlighttrispvs);
}
- else if (r_shadow_frontsidecasting.integer && r_shadow_realtime_dlight_portalculling.integer)
+ else if (r_shadow_frontsidecasting.integer && r_shadow_realtime_dlight_portalculling.integer && info.model->brush.data_portals)
{
// use portal recursion for exact light volume culling, but not the expensive exact surface checking
Portal_Visibility(info.model, info.relativelightorigin, info.outleaflist, info.outleafpvs, &info.outnumleafs, info.outsurfacelist, info.outsurfacepvs, &info.outnumsurfaces, NULL, 0, r_shadow_realtime_dlight_portalculling.integer >= 2, info.lightmins, info.lightmaxs, info.outmins, info.outmaxs, info.outshadowtrispvs, info.outlighttrispvs);