disable shadows casted by viewmodels, more perf stats
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "ae5c8a4b4f723b60b8b31290a9dfb21a",
|
||||
"ShadowsMode": 3,
|
||||
"ShadowsMode": 0,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
@@ -69,7 +69,7 @@
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "ae5c8a4b4f723b60b8b31290a9dfb21a",
|
||||
"ShadowsMode": 3,
|
||||
"ShadowsMode": 0,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
|
||||
@@ -219,7 +219,21 @@ namespace Game
|
||||
|
||||
globals.SetValue("Scene Lighting", boolValue);
|
||||
|
||||
// TODO: make sure AO is disabled (it's not)
|
||||
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
{
|
||||
AmbientOcclusionSettings aoSettings = postFx.AmbientOcclusion;
|
||||
/*aoSettings.OverrideFlags = (aoSettings.OverrideFlags & ~AmbientOcclusionSettingsOverride.Enabled) |
|
||||
(boolValue
|
||||
? AmbientOcclusionSettingsOverride.Enabled
|
||||
: 0 & AmbientOcclusionSettingsOverride.Enabled);
|
||||
*/
|
||||
aoSettings.Enabled = boolValue;
|
||||
postFx.AmbientOcclusion = aoSettings;
|
||||
}
|
||||
|
||||
// TODO: disable GI
|
||||
|
||||
Light[] lights = Level.GetActors<Light>();
|
||||
foreach (Light light in lights)
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Game
|
||||
[ExecuteInEditMode]
|
||||
public class PerformanceWidget : Script
|
||||
{
|
||||
private const double updateInterval = 0.25;
|
||||
private const double updateInterval = 0.2;
|
||||
|
||||
public UIControl control;
|
||||
private Label label;
|
||||
@@ -37,7 +37,23 @@ namespace Game
|
||||
updateTimeAvg = elapsed / updateTimeCount;
|
||||
updateTimeCount = 0;
|
||||
|
||||
label.Text = $"{(int)Math.Round(1.0f / updateTimeAvg)}fps";
|
||||
label.Text = "";
|
||||
|
||||
long triangles = 0;
|
||||
long drawCalls = 0;
|
||||
|
||||
#if BUILD_DEBUG || BUILD_DEVELOPMENT
|
||||
var gpuEvents = ProfilingTools.EventsGPU;
|
||||
if (gpuEvents.Length > 0)
|
||||
{
|
||||
triangles = gpuEvents[0].Stats.Triangles;
|
||||
drawCalls = gpuEvents[0].Stats.DrawCalls;
|
||||
}
|
||||
#endif
|
||||
|
||||
label.Text += $"{triangles} tris\n {drawCalls} drawcalls\n";
|
||||
|
||||
label.Text += $"{(int)Math.Round(1.0f / updateTimeAvg)}fps";
|
||||
}
|
||||
|
||||
#if false
|
||||
|
||||
Reference in New Issue
Block a user