if (layer->flags & ALIASLAYER_FOG)
{
colorscale *= fog;
+ GL_ColorPointer(NULL);
GL_Color(fogcolor[0] * colorscale, fogcolor[1] * colorscale, fogcolor[2] * colorscale, ent->alpha);
}
else
VectorScale(tint, r_shadow_realtime_world_lightmaps.value, tint);
colorscale *= ifog;
if (fullbright)
+ {
+ GL_ColorPointer(NULL);
GL_Color(tint[0] * colorscale, tint[1] * colorscale, tint[2] * colorscale, ent->alpha);
+ }
else
{
if (R_LightModel(ambientcolor4f, diffusecolor, diffusenormal, ent, tint[0] * colorscale, tint[1] * colorscale, tint[2] * colorscale, ent->alpha, false))
R_LightModel_CalcVertexColors(ambientcolor4f, diffusecolor, diffusenormal, mesh->num_vertices, varray_vertex3f, varray_normal3f, varray_color4f);
}
else
+ {
+ GL_ColorPointer(NULL);
GL_Color(ambientcolor4f[0], ambientcolor4f[1], ambientcolor4f[2], ambientcolor4f[3]);
+ }
}
}
R_Mesh_Draw(mesh->num_vertices, mesh->num_triangles, mesh->data_element3i);
float projectdistance;
if (ent->effects & EF_ADDITIVE || ent->alpha < 1)
return;
- projectdistance = lightradius + ent->model->radius - sqrt(DotProduct(relativelightorigin, relativelightorigin));
+ projectdistance = lightradius + ent->model->radius;// - sqrt(DotProduct(relativelightorigin, relativelightorigin));
if (projectdistance > 0.1)
{
R_Mesh_Matrix(&ent->matrix);
if (skin->flags & ALIASSKIN_TRANSPARENT)
continue;
R_Model_Alias_GetMesh_Array3f(ent, mesh, MODELARRAY_VERTEX, varray_vertex3f);
- R_Shadow_Volume(mesh->num_vertices, mesh->num_triangles, varray_vertex3f, mesh->data_element3i, mesh->data_neighbor3i, relativelightorigin, lightradius, projectdistance);
+ R_Shadow_VolumeFromSphere(mesh->num_vertices, mesh->num_triangles, varray_vertex3f, mesh->data_element3i, mesh->data_neighbor3i, relativelightorigin, projectdistance, lightradius);
}
}
}
R_LightModel_CalcVertexColors(ambientcolor4f, diffusecolor, diffusenormal, numverts, varray_vertex3f, aliasvert_normal3f, varray_color4f);
}
else
+ {
+ GL_ColorPointer(NULL);
GL_Color(ambientcolor4f[0], ambientcolor4f[1], ambientcolor4f[2], ambientcolor4f[3]);
+ }
R_Mesh_Draw(numverts, numtriangles, elements);
c_alias_polys += numtriangles;
//mstate.pointer_texcoord = ent->model->alias.zymdata_texcoords;
R_Mesh_State_Texture(&mstate);
+ GL_ColorPointer(NULL);
GL_Color(fogcolor[0], fogcolor[1], fogcolor[2], ent->alpha * fog);
ZymoticTransformVerts(numverts, varray_vertex3f, ent->model->alias.zymdata_vertbonecounts, ent->model->alias.zymdata_verts);
R_Mesh_Draw(numverts, numtriangles, elements);