cvar_t r_shadow_bouncegrid_threaded = {CF_CLIENT | CF_ARCHIVE, "r_shadow_bouncegrid_threaded", "1", "enables use of taskqueue_maxthreads to perform the traces and slice rendering of bouncegrid"};
cvar_t r_coronas = {CF_CLIENT | CF_ARCHIVE, "r_coronas", "0", "brightness of corona flare effects around certain lights, 0 disables corona effects"};
cvar_t r_coronas_occlusionsizescale = {CF_CLIENT | CF_ARCHIVE, "r_coronas_occlusionsizescale", "0.1", "size of light source for corona occlusion checksum the proportion of hidden pixels controls corona intensity"};
cvar_t r_shadow_bouncegrid_threaded = {CF_CLIENT | CF_ARCHIVE, "r_shadow_bouncegrid_threaded", "1", "enables use of taskqueue_maxthreads to perform the traces and slice rendering of bouncegrid"};
cvar_t r_coronas = {CF_CLIENT | CF_ARCHIVE, "r_coronas", "0", "brightness of corona flare effects around certain lights, 0 disables corona effects"};
cvar_t r_coronas_occlusionsizescale = {CF_CLIENT | CF_ARCHIVE, "r_coronas_occlusionsizescale", "0.1", "size of light source for corona occlusion checksum the proportion of hidden pixels controls corona intensity"};
-cvar_t r_coronas_occlusionquery = {CF_CLIENT | CF_ARCHIVE, "r_coronas_occlusionquery", "0", "fades coronas according to visibility"};
+cvar_t r_coronas_occlusionquery = {CF_CLIENT | CF_ARCHIVE, "r_coronas_occlusionquery", "0", "fades coronas according to visibility, requires OpenGL 4.4"};
cvar_t gl_flashblend = {CF_CLIENT | CF_ARCHIVE, "gl_flashblend", "0", "render bright coronas for dynamic lights instead of actual lighting, fast but ugly"};
cvar_t r_editlights = {CF_CLIENT, "r_editlights", "0", "enables .rtlights file editing mode"};
cvar_t r_editlights_cursordistance = {CF_CLIENT, "r_editlights_cursordistance", "1024", "maximum distance of cursor from eye"};
cvar_t gl_flashblend = {CF_CLIENT | CF_ARCHIVE, "gl_flashblend", "0", "render bright coronas for dynamic lights instead of actual lighting, fast but ugly"};
cvar_t r_editlights = {CF_CLIENT, "r_editlights", "0", "enables .rtlights file editing mode"};
cvar_t r_editlights_cursordistance = {CF_CLIENT, "r_editlights_cursordistance", "1024", "maximum distance of cursor from eye"};
float dist = sqrt(x*x+y*y+z*z);
float intensity = dist < 1 ? ((1.0f - dist) * r_shadow_lightattenuationlinearscale.value / (r_shadow_lightattenuationdividebias.value + dist*dist)) : 0;
// note this code could suffer byte order issues except that it is multiplying by an integer that reads the same both ways
float dist = sqrt(x*x+y*y+z*z);
float intensity = dist < 1 ? ((1.0f - dist) * r_shadow_lightattenuationlinearscale.value / (r_shadow_lightattenuationdividebias.value + dist*dist)) : 0;
// note this code could suffer byte order issues except that it is multiplying by an integer that reads the same both ways
VectorNegate(specularcolor, specularcolor);
GL_BlendEquationSubtract(true);
}
VectorNegate(specularcolor, specularcolor);
GL_BlendEquationSubtract(true);
}
VectorCopy(color, rtlight->color);
rtlight->cubemapname[0] = 0;
if (cubemapname && cubemapname[0])
VectorCopy(color, rtlight->color);
rtlight->cubemapname[0] = 0;
if (cubemapname && cubemapname[0])
light->coronasizescale = coronasizescale;
light->ambientscale = ambientscale;
light->diffusescale = diffusescale;
light->coronasizescale = coronasizescale;
light->ambientscale = ambientscale;
light->diffusescale = diffusescale;
while (key[strlen(key)-1] == ' ') // remove trailing spaces
key[strlen(key)-1] = 0;
if (!COM_ParseToken_Simple(&data, false, false, true))
break; // error
while (key[strlen(key)-1] == ' ') // remove trailing spaces
key[strlen(key)-1] = 0;
if (!COM_ParseToken_Simple(&data, false, false, true))
break; // error
// now that we have the key pair worked out...
if (!strcmp("light", key))
// now that we have the key pair worked out...
if (!strcmp("light", key))
radius = r_shadow_selectedlight->radius;
style = r_shadow_selectedlight->style;
if (*r_shadow_selectedlight->cubemapname)
radius = r_shadow_selectedlight->radius;
style = r_shadow_selectedlight->style;
if (*r_shadow_selectedlight->cubemapname)
- strlcpy(cubemapname, Cmd_Argv(cmd, 2), sizeof(cubemapname));
+ dp_strlcpy(cubemapname, Cmd_Argv(cmd, 2), sizeof(cubemapname));
r_shadow_bufferlight.radius = r_shadow_selectedlight->radius;
r_shadow_bufferlight.style = r_shadow_selectedlight->style;
if (*r_shadow_selectedlight->cubemapname)
r_shadow_bufferlight.radius = r_shadow_selectedlight->radius;
r_shadow_bufferlight.style = r_shadow_selectedlight->style;
if (*r_shadow_selectedlight->cubemapname)
- strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname));
+ dp_strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname));
else
r_shadow_bufferlight.cubemapname[0] = 0;
r_shadow_bufferlight.shadow = r_shadow_selectedlight->shadow;
else
r_shadow_bufferlight.cubemapname[0] = 0;
r_shadow_bufferlight.shadow = r_shadow_selectedlight->shadow;