cvar_t r_lightmodels = {CVAR_SAVE, "r_lightmodels", "1"};
cvar_t r_vismarklights = {0, "r_vismarklights", "1"};
cvar_t r_lightmodels = {CVAR_SAVE, "r_lightmodels", "1"};
cvar_t r_vismarklights = {0, "r_vismarklights", "1"};
Cvar_RegisterVariable(&r_vismarklights);
R_RegisterModule("R_Light", r_light_start, r_light_shutdown, r_light_newmap);
}
Cvar_RegisterVariable(&r_vismarklights);
R_RegisterModule("R_Light", r_light_start, r_light_shutdown, r_light_newmap);
}
VectorSubtract(rd->origin, vpn, diff);
if (TraceLine(r_origin, diff, NULL, NULL, 0, true) == 1)
{
VectorSubtract(rd->origin, vpn, diff);
if (TraceLine(r_origin, diff, NULL, NULL, 0, true) == 1)
{
m.cr = rd->light[0] * scale;
m.cg = rd->light[1] * scale;
m.cb = rd->light[2] * scale;
m.cr = rd->light[0] * scale;
m.cg = rd->light[1] * scale;
m.cb = rd->light[2] * scale;
tvxyz[3][0] = rd->origin[0] + vright[0] * scale - vup[0] * scale;
tvxyz[3][1] = rd->origin[1] + vright[1] * scale - vup[1] * scale;
tvxyz[3][2] = rd->origin[2] + vright[2] * scale - vup[2] * scale;
tvxyz[3][0] = rd->origin[0] + vright[0] * scale - vup[0] * scale;
tvxyz[3][1] = rd->origin[1] + vright[1] * scale - vup[1] * scale;
tvxyz[3][2] = rd->origin[2] + vright[2] * scale - vup[2] * scale;
int row;
float low[3], high[3], dist, maxdist;
int row;
float low[3], high[3], dist, maxdist;
int maps, line3, size3, dsfrac = ds & 15, dtfrac = dt & 15, scale = 0, r00 = 0, g00 = 0, b00 = 0, r01 = 0, g01 = 0, b01 = 0, r10 = 0, g10 = 0, b10 = 0, r11 = 0, g11 = 0, b11 = 0;
line3 = ((surf->extents[0]>>4)+1)*3;
size3 = ((surf->extents[0]>>4)+1) * ((surf->extents[1]>>4)+1)*3; // LordHavoc: *3 for colored lighting
int maps, line3, size3, dsfrac = ds & 15, dtfrac = dt & 15, scale = 0, r00 = 0, g00 = 0, b00 = 0, r01 = 0, g01 = 0, b01 = 0, r10 = 0, g10 = 0, b10 = 0, r11 = 0, g11 = 0, b11 = 0;
line3 = ((surf->extents[0]>>4)+1)*3;
size3 = ((surf->extents[0]>>4)+1) * ((surf->extents[1]>>4)+1)*3; // LordHavoc: *3 for colored lighting
- float color[3], basecolor[3], v[3], t, *av, *avn, *avc, a, number, f, hardness, hardnessoffset, dist2;
+ float color[3], basecolor[3], v[3], t, *av, *avn, *avc, a, number, f/*, hardness, hardnessoffset*/, dist2;
- VectorCopy(sl->origin, nl->origin);
+ // transform the light into the model's coordinate system
+ if (worldcoords)
+ VectorCopy(sl->origin, nl->origin);
+ else
+ softwareuntransform(sl->origin, nl->origin);
VectorCopy(sl->color, nl->light);
nl->cullradius2 = 99999999;
nl->lightsubtract = 0;
VectorCopy(sl->color, nl->light);
nl->cullradius2 = 99999999;
nl->lightsubtract = 0;
//if (TraceLine(currentrenderentity->origin, r_dlight[i].origin, NULL, NULL, 0) == 1)
{
// transform the light into the model's coordinate system
//if (TraceLine(currentrenderentity->origin, r_dlight[i].origin, NULL, NULL, 0) == 1)
{
// transform the light into the model's coordinate system
- VectorCopy(r_dlight[i].light, nl->light);
+ nl->light[0] = r_dlight[i].light[0] * colorr;
+ nl->light[1] = r_dlight[i].light[1] * colorg;
+ nl->light[2] = r_dlight[i].light[2] * colorb;
else
R_CompleteLightPoint (basecolor, currentrenderentity->origin, true, NULL);
}
else
R_CompleteLightPoint (basecolor, currentrenderentity->origin, true, NULL);
}
for (i = 0;i < numverts;i++)
{
VectorCopy(basecolor, color);
for (i = 0;i < numverts;i++)
{
VectorCopy(basecolor, color);
#endif
// DotProduct(avn,v) * t is dotproduct with a normalized v,
// the hardness variables are for backlighting/shinyness
#endif
// DotProduct(avn,v) * t is dotproduct with a normalized v,
// the hardness variables are for backlighting/shinyness
if (f > 0)
VectorMA(color, f, nl->light, color);
}
if (f > 0)
VectorMA(color, f, nl->light, color);
}