Change hwdetect to handle slightly more cases with the water detection.

Updates a few more maps with new settings.

This was SVN commit r12830.
This commit is contained in:
wraitii 2012-11-07 10:53:37 +00:00
parent 10752c798d
commit c722fbd93f
18 changed files with 63 additions and 34 deletions

View File

@ -172,7 +172,9 @@ function RunDetection(settings)
var disable_s3tc = undefined;
var disable_shadows = undefined;
var disable_shadowpcf = undefined;
var disable_allwater = undefined;
var disable_fancywater = undefined;
var disable_fbowater = undefined;
var override_renderpath = undefined;
// TODO: add some mechanism for setting config values
@ -247,7 +249,9 @@ function RunDetection(settings)
(os_win && IsWorseThanIntelWindows(GL_RENDERER, "Intel(R) Graphics Media Accelerator HD"))
)
{
disable_allwater = false;
disable_fancywater = true;
//disable_fbowater = true;
disable_shadowpcf = true;
}
@ -264,7 +268,7 @@ function RunDetection(settings)
if (GL_RENDERER.match(/^GeForce FX /))
{
override_renderpath = "fixed";
disable_fancywater = true;
disable_allwater = true;
}
// http://trac.wildfiregames.com/ticket/964
@ -283,7 +287,9 @@ function RunDetection(settings)
"disable_s3tc": disable_s3tc,
"disable_shadows": disable_shadows,
"disable_shadowpcf": disable_shadowpcf,
"disable_allwater": disable_allwater,
"disable_fancywater": disable_fancywater,
"disable_fbowater": disable_fbowater,
"override_renderpath": override_renderpath,
};
}
@ -317,8 +323,14 @@ global.RunHardwareDetection = function(settings)
if (output.disable_shadowpcf !== undefined)
Engine.SetDisableShadowPCF(output.disable_shadowpcf);
if (output.disable_allwater !== undefined)
Engine.SetDisableFancyWater(output.disable_allwater);
if (output.disable_fancywater !== undefined)
Engine.SetDisableFancyWater(output.disable_fancywater);
if (output.disable_fbowater !== undefined)
Engine.SetDisableFancyWater(output.disable_fbowater);
if (output.override_renderpath !== undefined)
Engine.SetRenderPath(output.override_renderpath);

View File

@ -29,7 +29,7 @@ for each (var settings in hwdetectTestData)
var os = (settings.os_linux ? "linux" : settings.os_macosx ? "macosx" : settings.os_win ? "win" : "???");
var disabled = [];
for each (var d in ["disable_audio", "disable_s3tc", "disable_shadows", "disable_shadowpcf", "disable_fancywater", "override_renderpath"])
for each (var d in ["disable_audio", "disable_s3tc", "disable_shadows", "disable_shadowpcf", "disable_allwater", "disable_fbowater", "disable_fancywater", "override_renderpath"])
if (output[d] !== undefined)
disabled.push(d+"="+output[d])

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -266,9 +266,6 @@ void main()
#else
colour = mix(texture2D(refractionMap, (0.5*gl_TexCoord[2].xy) / gl_TexCoord[2].w + 0.5).rgb ,colour, clamp(perceivedDepth,0.0,1.0));
#endif
#else
// I'm not even sure what this does.
//colour = mix( texture2D(refractionMap, (0.5*gl_TexCoord[2].xy) / gl_TexCoord[2].w + 0.5).rgb ,colour, clamp(perceivedDepth,0.0,1.0));
#endif
gl_FragColor.rgb = get_fog(colour) * losMod;

View File

@ -121,7 +121,7 @@ void SetDisableShadowPCF(void* UNUSED(cbdata), bool disabled)
g_ShadowPCF = !disabled;
}
void SetDisableFancyWater(void* UNUSED(cbdata), bool disabled)
void SetDisableAllWater(void* UNUSED(cbdata), bool disabled)
{
if (!IsOverridden("waternormals"))
g_WaterNormal = !disabled;
@ -138,6 +138,24 @@ void SetDisableFancyWater(void* UNUSED(cbdata), bool disabled)
if (!IsOverridden("watershadows"))
g_WaterShadows = !disabled;
}
void SetDisableFancyWater(void* UNUSED(cbdata), bool disabled)
{
if (!IsOverridden("waterrealdepth"))
g_WaterRealDepth = !disabled;
if (!IsOverridden("waterfoam"))
g_WaterFoam = !disabled;
if (!IsOverridden("watercoastalwaves"))
g_WaterCoastalWaves = !disabled;
if (!IsOverridden("watershadows"))
g_WaterShadows = !disabled;
}
void SetDisableFBOWater(void* UNUSED(cbdata), bool disabled)
{
if (!IsOverridden("waterfoam"))
g_WaterFoam = !disabled;
if (!IsOverridden("watercoastalwaves"))
g_WaterCoastalWaves = !disabled;
}
void SetRenderPath(void* UNUSED(cbdata), std::string renderpath)
{
@ -154,7 +172,9 @@ void RunHardwareDetection()
scriptInterface.RegisterFunction<void, bool, &SetDisableS3TC>("SetDisableS3TC");
scriptInterface.RegisterFunction<void, bool, &SetDisableShadows>("SetDisableShadows");
scriptInterface.RegisterFunction<void, bool, &SetDisableShadowPCF>("SetDisableShadowPCF");
scriptInterface.RegisterFunction<void, bool, &SetDisableAllWater>("SetDisableAllWater");
scriptInterface.RegisterFunction<void, bool, &SetDisableFancyWater>("SetDisableFancyWater");
scriptInterface.RegisterFunction<void, bool, &SetDisableFBOWater>("SetDisableFBOWater");
scriptInterface.RegisterFunction<void, std::string, &SetRenderPath>("SetRenderPath");
// Load the detection script: