// set to full bright if no light data
bl = intblocklights;
- if ((ent->effects & EF_FULLBRIGHT) || !ent->model->brushq1.lightdata)
+ if (!ent->model->brushq1.lightdata)
{
for (i = 0;i < size3;i++)
bl[i] = 255*256;
// set to full bright if no light data
bl = floatblocklights;
- if ((ent->effects & EF_FULLBRIGHT) || !ent->model->brushq1.lightdata)
+ if (!ent->model->brushq1.lightdata)
j = 255*256;
else
j = r_ambient.value * 512.0f; // would be 128.0f logically, but using 512.0f to match winquake style
}
}
}
+ else if (ent->effects & EF_FULLBRIGHT)
+ {
+ RSurfShader_OpaqueWall_Pass_BaseTexture(ent, texture, surfchain);
+ if (r_detailtextures.integer)
+ RSurfShader_OpaqueWall_Pass_BaseDetail(ent, texture, surfchain);
+ if (texture->skin.glow)
+ RSurfShader_OpaqueWall_Pass_Glow(ent, texture, surfchain);
+ if (fogenabled)
+ RSurfShader_OpaqueWall_Pass_Fog(ent, texture, surfchain);
+ }
else if (r_shadow_realtime_world.integer)
{
// opaque base lighting
rmeshstate_t m;
if (!face->num_triangles)
return;
+ c_faces++;
if (skyrendernow)
{
skyrendernow = false;
{
if (!face->num_triangles)
return;
- if (face->texture->renderflags)
+ if (face->texture->surfaceparms)
{
- if (face->texture->renderflags & Q3MTEXTURERENDERFLAGS_SKY)
- return;
- if (face->texture->renderflags & Q3MTEXTURERENDERFLAGS_NODRAW)
+ if (face->texture->surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NODRAW))
return;
}
+ c_faces++;
face->visframe = r_framecount;
- if ((face->texture->renderflags & Q3MTEXTURERENDERFLAGS_TRANSPARENT) || ent->alpha < 1 || (ent->effects & EF_ADDITIVE))
+ if ((face->texture->surfaceparms & Q3SURFACEPARM_TRANS) || ent->alpha < 1 || (ent->effects & EF_ADDITIVE))
{
vec3_t facecenter, center;
facecenter[0] = (face->mins[0] + face->maxs[0]) * 0.5f;
{
if (R_CullBox(node->mins, node->maxs))
return;
+ c_nodes++;
R_Q3BSP_RecursiveWorldNode(ent, node->children[0], modelorg, pvs, markframe);
node = node->children[1];
}
if (R_CullBox(node->mins, node->maxs))
return;
+ c_leafs++;
leaf = (q3mleaf_t *)node;
if (pvs[leaf->clusterindex >> 3] & (1 << (leaf->clusterindex & 7)))
for (i = 0;i < leaf->numleaffaces;i++)
R_Q3BSP_RecursiveWorldNode(ent, model->brushq3.data_nodes, modelorg, pvs, r_framecount);
}
for (i = 0, face = model->brushq3.data_thismodel->firstface;i < model->brushq3.data_thismodel->numfaces;i++, face++)
- if (face->markframe == r_framecount && (face->texture->renderflags & Q3MTEXTURERENDERFLAGS_SKY) && !R_CullBox(face->mins, face->maxs))
+ if (face->markframe == r_framecount && (face->texture->surfaceflags & Q3SURFACEFLAG_SKY) && !R_CullBox(face->mins, face->maxs))
R_Q3BSP_DrawSkyFace(ent, face);
}
else
for (i = 0, face = model->brushq3.data_thismodel->firstface;i < model->brushq3.data_thismodel->numfaces;i++, face++)
- if ((face->texture->renderflags & Q3MTEXTURERENDERFLAGS_SKY))
+ if ((face->texture->surfaceflags & Q3SURFACEFLAG_SKY))
R_Q3BSP_DrawSkyFace(ent, face);
}
}
void R_Q3BSP_DrawFaceLight(entity_render_t *ent, q3mface_t *face, vec3_t relativelightorigin, vec3_t relativeeyeorigin, float lightradius, float *lightcolor, const matrix4x4_t *matrix_modeltofilter, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz)
{
- if ((face->texture->renderflags & Q3MTEXTURERENDERFLAGS_NODRAW) || !face->num_triangles)
+ if ((face->texture->surfaceflags & Q3SURFACEFLAG_NODRAW) || !face->num_triangles)
return;
R_Shadow_DiffuseLighting(face->num_vertices, face->num_triangles, face->data_element3i, face->data_vertex3f, face->data_svector3f, face->data_tvector3f, face->data_normal3f, face->data_texcoordtexture2f, relativelightorigin, lightradius, lightcolor, matrix_modeltofilter, matrix_modeltoattenuationxyz, matrix_modeltoattenuationz, face->texture->skin.base, face->texture->skin.nmap, NULL);
R_Shadow_SpecularLighting(face->num_vertices, face->num_triangles, face->data_element3i, face->data_vertex3f, face->data_svector3f, face->data_tvector3f, face->data_normal3f, face->data_texcoordtexture2f, relativelightorigin, relativeeyeorigin, lightradius, lightcolor, matrix_modeltofilter, matrix_modeltoattenuationxyz, matrix_modeltoattenuationz, face->texture->skin.gloss, face->texture->skin.nmap, NULL);