mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
renamed r_noiseScale to r_ditherStrength for consistency
This commit is contained in:
parent
718b966414
commit
1994475982
6 changed files with 9 additions and 9 deletions
|
@ -25,9 +25,9 @@ add: r_alphaToCoverage <0|1> (default: 1) enables alpha to coverage anti-aliasin
|
||||||
A2C AA can only work if MSAA is enabled (i.e. r_msaa > 1)
|
A2C AA can only work if MSAA is enabled (i.e. r_msaa > 1)
|
||||||
it is used to super-sample all fragments of alpha-tested surfaces
|
it is used to super-sample all fragments of alpha-tested surfaces
|
||||||
|
|
||||||
add: r_dither <0|1> (default: 0) enables the addition of noise to fight color banding artifacts
|
add: r_dither <0|1> (default: 0) enables the addition of noise to reduce color banding artifacts
|
||||||
|
|
||||||
add: r_noiseScale <0.125 to 8.0> (default: 1.0) controls the strength of the dithering noise
|
add: r_ditherStrength <0.125 to 8.0> (default: 1.0) controls the amount of noise added by dithering
|
||||||
|
|
||||||
add: r_gpuMipGen <0|1> (default: 1) enables GPU-side mip-map generation
|
add: r_gpuMipGen <0|1> (default: 1) enables GPU-side mip-map generation
|
||||||
this helps improve map load time (less to upload) and offers greater quality preservation options
|
this helps improve map load time (less to upload) and offers greater quality preservation options
|
||||||
|
|
|
@ -684,7 +684,7 @@ static void UploadPendingShaderData()
|
||||||
psData.seed[1] = d3d.frameSeed[1];
|
psData.seed[1] = d3d.frameSeed[1];
|
||||||
psData.invGamma = 1.0f / r_gamma->value;
|
psData.invGamma = 1.0f / r_gamma->value;
|
||||||
psData.invBrightness = 1.0f / r_brightness->value;
|
psData.invBrightness = 1.0f / r_brightness->value;
|
||||||
psData.noiseScale = backEnd.projection2D ? 0.0f : r_noiseScale->value;
|
psData.noiseScale = backEnd.projection2D ? 0.0f : r_ditherStrength->value;
|
||||||
ResetShaderData(pipeline->vertexBuffer, &vsData, sizeof(vsData));
|
ResetShaderData(pipeline->vertexBuffer, &vsData, sizeof(vsData));
|
||||||
ResetShaderData(pipeline->pixelBuffer, &psData, sizeof(psData));
|
ResetShaderData(pipeline->pixelBuffer, &psData, sizeof(psData));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2161,7 +2161,7 @@ static void DrawGeneric()
|
||||||
pipeline->uniformLocations[GU_GAMMA_BRIGHT_NOISE_SEED],
|
pipeline->uniformLocations[GU_GAMMA_BRIGHT_NOISE_SEED],
|
||||||
1.0f / r_gamma->value,
|
1.0f / r_gamma->value,
|
||||||
1.0f / r_brightness->value,
|
1.0f / r_brightness->value,
|
||||||
backEnd.projection2D ? 0.0f : r_noiseScale->value,
|
backEnd.projection2D ? 0.0f : r_ditherStrength->value,
|
||||||
(float)rand() / (float)RAND_MAX);
|
(float)rand() / (float)RAND_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,9 +157,9 @@ S_COLOR_VAL " T2 " S_COLOR_HELP "= Tent 2 (1/3 2/3, same as the CPU version)
|
||||||
#define help_r_dither \
|
#define help_r_dither \
|
||||||
"enables dithering\n" \
|
"enables dithering\n" \
|
||||||
"Introduces noise to fight color banding artifacts.\n" \
|
"Introduces noise to fight color banding artifacts.\n" \
|
||||||
"The strength of the noise is controlled by " S_COLOR_CVAR "r_noiseScale" S_COLOR_HELP "."
|
"The strength of the noise is controlled by " S_COLOR_CVAR "r_ditherStrength" S_COLOR_HELP "."
|
||||||
|
|
||||||
#define help_r_noiseScale \
|
#define help_r_ditherStrength \
|
||||||
"dithering noise strength\n" \
|
"dithering noise strength\n" \
|
||||||
"The dithering on/off switch is " S_COLOR_CVAR "r_dither" S_COLOR_HELP "."
|
"The dithering on/off switch is " S_COLOR_CVAR "r_dither" S_COLOR_HELP "."
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ cvar_t *r_rtColorFormat;
|
||||||
|
|
||||||
cvar_t *r_mipGenFilter;
|
cvar_t *r_mipGenFilter;
|
||||||
cvar_t *r_mipGenGamma;
|
cvar_t *r_mipGenGamma;
|
||||||
cvar_t *r_noiseScale;
|
cvar_t *r_ditherStrength;
|
||||||
cvar_t *r_transpSort;
|
cvar_t *r_transpSort;
|
||||||
cvar_t *r_gl3_geoStream;
|
cvar_t *r_gl3_geoStream;
|
||||||
cvar_t *r_d3d11_syncOffsets;
|
cvar_t *r_d3d11_syncOffsets;
|
||||||
|
@ -408,7 +408,7 @@ static const cvarTableItem_t r_cvars[] =
|
||||||
{ &r_textureMode, "r_textureMode", "best", CVAR_ARCHIVE | CVAR_LATCH, CVART_STRING, NULL, NULL, help_r_textureMode },
|
{ &r_textureMode, "r_textureMode", "best", CVAR_ARCHIVE | CVAR_LATCH, CVART_STRING, NULL, NULL, help_r_textureMode },
|
||||||
{ &r_gamma, "r_gamma", "1.2", CVAR_ARCHIVE, CVART_FLOAT, "0.5", "3", help_r_gamma },
|
{ &r_gamma, "r_gamma", "1.2", CVAR_ARCHIVE, CVART_FLOAT, "0.5", "3", help_r_gamma },
|
||||||
{ &r_greyscale, "r_greyscale", "0", CVAR_ARCHIVE, CVART_FLOAT, "0", "1", "controls how monochrome the final image looks" },
|
{ &r_greyscale, "r_greyscale", "0", CVAR_ARCHIVE, CVART_FLOAT, "0", "1", "controls how monochrome the final image looks" },
|
||||||
{ &r_noiseScale, "r_noiseScale", "1.0", CVAR_ARCHIVE, CVART_FLOAT, "0.125", "8.0", help_r_noiseScale },
|
{ &r_ditherStrength, "r_ditherStrength", "1.0", CVAR_ARCHIVE, CVART_FLOAT, "0.125", "8.0", help_r_ditherStrength },
|
||||||
{ &r_transpSort, "r_transpSort", "0", CVAR_ARCHIVE, CVART_BOOL, NULL, NULL, help_r_transpSort },
|
{ &r_transpSort, "r_transpSort", "0", CVAR_ARCHIVE, CVART_BOOL, NULL, NULL, help_r_transpSort },
|
||||||
{ &r_lodCurveError, "r_lodCurveError", "2000", CVAR_ARCHIVE, CVART_FLOAT, "250", "10000", "curved surfaces LOD scale" },
|
{ &r_lodCurveError, "r_lodCurveError", "2000", CVAR_ARCHIVE, CVART_FLOAT, "250", "10000", "curved surfaces LOD scale" },
|
||||||
|
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ extern cvar_t *r_displayRefresh; // optional display refresh option
|
||||||
extern cvar_t *r_intensity;
|
extern cvar_t *r_intensity;
|
||||||
extern cvar_t *r_gamma;
|
extern cvar_t *r_gamma;
|
||||||
extern cvar_t *r_greyscale;
|
extern cvar_t *r_greyscale;
|
||||||
extern cvar_t *r_noiseScale; // the strength of the dithering noise
|
extern cvar_t *r_ditherStrength; // the strength of the dithering noise
|
||||||
extern cvar_t *r_transpSort; // transparency sorting mode
|
extern cvar_t *r_transpSort; // transparency sorting mode
|
||||||
extern cvar_t *r_lightmap; // render lightmaps only
|
extern cvar_t *r_lightmap; // render lightmaps only
|
||||||
extern cvar_t *r_lightmapGreyscale; // how monochrome the lightmap looks
|
extern cvar_t *r_lightmapGreyscale; // how monochrome the lightmap looks
|
||||||
|
|
Loading…
Reference in a new issue