Integrating up through commit 90f050496
parent
8f2ed080a9
commit
c2cbd430fe
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:00f8a158fcfb667b060c902ed2129024f5041816e299c9cace2370f4ac60287d
|
||||
size 10762
|
||||
oid sha256:ec428aee9c49ffd58a00fdcbb0625185a22f5690f7b2e81326ef5443699019e6
|
||||
size 10945
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f096ae6620bbb17e9a1c98f7f476f62762753e1359a1dfe84192ba3e052e6404
|
||||
size 10036
|
||||
oid sha256:6df3d83f5b9dd43118aba5cef3a8fe9ee42ee253f7bd3886fc7c88f41c504fff
|
||||
size 8802
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<download name="C12712455_ScriptCanvas_ShapeCastVerification" type="Map">
|
||||
<index src="filelist.xml" dest="filelist.xml"/>
|
||||
<files>
|
||||
<file src="level.pak" dest="level.pak" size="39334" md5="5417e93c2bad794e3224d1a528bc6e41"/>
|
||||
<file src="level.pak" dest="level.pak" size="98C9" md5="7756a398952b61a1ba7d4753ec01b030"/>
|
||||
</files>
|
||||
</download>
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8cdc13062aba6712ebbcc2f32f49295cd1e872f7313a02994f8d06baf7765bd0
|
||||
size 39334
|
||||
oid sha256:625b55f2edc3e8eabeea7d87575119590fe7ed88db70a6125eb6bf9d891d743f
|
||||
size 39113
|
||||
|
||||
@ -1,356 +1,356 @@
|
||||
<TimeOfDay Time="13.5" TimeStart="13.5" TimeEnd="13.5" TimeAnimSpeed="0">
|
||||
<Variable Name="Sun color" Color="0.99989021,0.99946922,0.9991194">
|
||||
<Spline Keys="-0.000628322:(0.783538:0.89627:0.930341):36,0:(0.783538:0.887923:0.921582):36,0.229167:(0.783538:0.879623:0.921582):36,0.25:(0.947307:0.745404:0.577581):36,0.458333:(1:1:1):36,0.5625:(1:1:1):36,0.75:(0.947307:0.745404:0.577581):36,0.770833:(0.783538:0.879623:0.921582):36,1:(0.783538:0.89627:0.930556):36,"/>
|
||||
<Variable Name="Sun color" Color="0.78353798,0.89626998,0.93034101">
|
||||
<Spline Keys="-0.000628322:(0.783538:0.89627:0.930341):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun intensity" Value="92366.68">
|
||||
<Spline Keys="0:1000:36,0.229167:1000:36,0.5:120000:36,0.770833:1000:65572,0.999306:1000:36,"/>
|
||||
<Variable Name="Sun intensity" Value="1000">
|
||||
<Spline Keys="0:1000:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun specular multiplier" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:36,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color" Color="0.27049801,0.47353199,0.83076996">
|
||||
<Spline Keys="0:(0.00651209:0.00972122:0.0137021):36,0.229167:(0.00604883:0.00972122:0.0137021):36,0.25:(0.270498:0.473532:0.83077):36,0.5:(0.270498:0.473532:0.83077):458788,0.75:(0.270498:0.473532:0.83077):36,0.770833:(0.00604883:0.00972122:0.0137021):36,1:(0.00651209:0.00972122:0.0137021):36,"/>
|
||||
<Variable Name="Fog color" Color="0.0065120901,0.0097212195,0.0137021">
|
||||
<Spline Keys="0:(0.00651209:0.00972122:0.0137021):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color multiplier" Value="1">
|
||||
<Spline Keys="0:0.5:36,0.229167:0.5:36,0.25:1:36,0.5:1:36,0.75:1:36,0.770833:0.5:36,1:0.5:65572,"/>
|
||||
<Variable Name="Fog color multiplier" Value="0.5">
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog height (bottom)" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog layer density (bottom)" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:36,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (top)" Color="0.597202,0.72305501,0.91309899">
|
||||
<Spline Keys="0:(0.00699541:0.00972122:0.0122865):36,0.229167:(0.00699541:0.00972122:0.0122865):36,0.25:(0.597202:0.723055:0.913099):36,0.5:(0.597202:0.723055:0.913099):458788,0.75:(0.597202:0.723055:0.913099):36,0.770833:(0.00699541:0.00972122:0.0122865):36,1:(0.00699541:0.00972122:0.0122865):36,"/>
|
||||
<Variable Name="Fog color (top)" Color="0.0069954102,0.0097212195,0.0122865">
|
||||
<Spline Keys="0:(0.00699541:0.00972122:0.0122865):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (top) multiplier" Value="0.88389361">
|
||||
<Spline Keys="-4.40702e-06:0.5:36,0.0297507:0.499195:36,0.229167:0.5:36,0.5:1:36,0.770833:0.5:36,1:0.5:36,"/>
|
||||
<Variable Name="Fog color (top) multiplier" Value="0.5">
|
||||
<Spline Keys="-4.40702e-06:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog height (top)" Value="100.00001">
|
||||
<Spline Keys="0:100:36,0.25:100:36,0.5:100:36,0.75:100:65572,1:100:36,"/>
|
||||
<Variable Name="Fog height (top)" Value="100">
|
||||
<Spline Keys="0:100:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog layer density (top)" Value="9.9999997e-05">
|
||||
<Spline Keys="0:0.0001:36,0.25:0.0001:36,0.5:0.0001:65572,0.75:0.0001:36,1:0.0001:36,"/>
|
||||
<Spline Keys="0:0.0001:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color height offset" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:65572,"/>
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (radial)" Color="0.78592348,0.52744436,0.17234583">
|
||||
<Spline Keys="0:(0:0:0):36,0.229167:(0.00439144:0.00367651:0.00334654):36,0.25:(0.838799:0.564712:0.184475):36,0.5:(0.768151:0.514918:0.168269):458788,0.75:(0.838799:0.564712:0.184475):36,0.770833:(0.00402472:0.00334654:0.00303527):36,1:(0:0:0):36,"/>
|
||||
<Variable Name="Fog color (radial)" Color="0,0,0">
|
||||
<Spline Keys="0:(0:0:0):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (radial) multiplier" Value="6">
|
||||
<Spline Keys="0:0:36,0.25:6:36,0.5:6:36,0.75:6:36,1:0:36,"/>
|
||||
<Variable Name="Fog color (radial) multiplier" Value="0">
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog radial size" Value="0.85000002">
|
||||
<Spline Keys="0:0:36,0.25:0.85:65572,0.5:0.85:36,0.75:0.85:36,1:0:36,"/>
|
||||
<Variable Name="Fog radial size" Value="0">
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog radial lobe" Value="0.75">
|
||||
<Spline Keys="0:0:36,0.25:0.75:36,0.5:0.75:36,0.75:0.75:65572,1:0:36,"/>
|
||||
<Variable Name="Fog radial lobe" Value="0">
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Final density clamp" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Global density" Value="1.5">
|
||||
<Spline Keys="0:1.5:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:1.5:36,"/>
|
||||
<Spline Keys="0:1.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp start" Value="25.000002">
|
||||
<Spline Keys="0:25:36,0.25:25:36,0.5:25:65572,0.75:25:36,1:25:36,"/>
|
||||
<Variable Name="Volumetric fog: Ramp start" Value="25">
|
||||
<Spline Keys="0:25:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp end" Value="1000.0001">
|
||||
<Spline Keys="0:1000:36,0.25:1000:36,0.5:1000:65572,0.75:1000:36,1:1000:36,"/>
|
||||
<Variable Name="Volumetric fog: Ramp end" Value="1000">
|
||||
<Spline Keys="0:1000:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp influence" Value="0.69999993">
|
||||
<Spline Keys="0:0.7:36,0.25:0.7:36,0.5:0.7:65572,0.75:0.7:36,1:0.7:36,"/>
|
||||
<Variable Name="Volumetric fog: Ramp influence" Value="0.69999999">
|
||||
<Spline Keys="0:0.7:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow darkening" Value="0.20000002">
|
||||
<Spline Keys="0:0.2:36,0.25:0.2:36,0.5:0.2:65572,0.75:0.2:36,1:0.2:36,"/>
|
||||
<Variable Name="Volumetric fog: Shadow darkening" Value="0.2">
|
||||
<Spline Keys="0:0.2:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow darkening sun" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow darkening ambient" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow range" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Volumetric fog: Shadow range" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog height (bottom)" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
<Spline Keys="0:0:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog layer density (bottom)" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog height (top)" Value="4000">
|
||||
<Spline Keys="0:4000:0,1:4000:0,"/>
|
||||
<Spline Keys="0:4000:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog layer density (top)" Value="9.9999997e-05">
|
||||
<Spline Keys="0:0.0001:0,1:0.0001:0,"/>
|
||||
<Spline Keys="0:0.0001:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Global fog density" Value="0.1">
|
||||
<Spline Keys="0:0.1:0,1:0.1:0,"/>
|
||||
<Spline Keys="0:0.1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Ramp start" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
<Spline Keys="0:0:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Ramp end" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
<Spline Keys="0:0:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog albedo color (atmosphere)" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
|
||||
<Spline Keys="0:(1:1:1):0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (atmosphere)" Value="0.60000002">
|
||||
<Spline Keys="0:0.6:0,1:0.6:0,"/>
|
||||
<Spline Keys="0:0.6:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog albedo color (sun radial)" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
|
||||
<Spline Keys="0:(1:1:1):0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (sun radial)" Value="0.94999999">
|
||||
<Spline Keys="0:0.95:0,1:0.95:0,"/>
|
||||
<Spline Keys="0:0.95:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Blend factor for sun scattering" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Blend mode for sun scattering" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
<Spline Keys="0:0:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog albedo color (entities)" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
|
||||
<Spline Keys="0:(1:1:1):0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (entities)" Value="0.60000002">
|
||||
<Spline Keys="0:0.6:0,1:0.6:0,"/>
|
||||
<Spline Keys="0:0.6:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Maximum range of ray-marching" Value="64">
|
||||
<Spline Keys="0:64:0,1:64:0,"/>
|
||||
<Spline Keys="0:64:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: In-scattering factor" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Extinction factor" Value="0.30000001">
|
||||
<Spline Keys="0:0.3:0,1:0.3:0,"/>
|
||||
<Spline Keys="0:0.3:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Analytical volumetric fog visibility" Value="0.5">
|
||||
<Spline Keys="0:0.5:0,1:0.5:0,"/>
|
||||
<Spline Keys="0:0.5:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Final density clamp" Value="1">
|
||||
<Spline Keys="0:1:0,0.5:1:36,1:1:0,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Sun intensity" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.494381:(1:1:1):65572,0.5:(1:1:1):36,0.75:(1:1:1):36,1:(1:1:1):36,"/>
|
||||
<Spline Keys="0:(1:1:1):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Sun intensity multiplier" Value="200.00002">
|
||||
<Spline Keys="0:200:36,0.25:200:36,0.5:200:36,0.75:200:36,1:200:36,"/>
|
||||
<Variable Name="Sky light: Sun intensity multiplier" Value="200">
|
||||
<Spline Keys="0:200:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Mie scattering" Value="6.779707">
|
||||
<Spline Keys="0:40:36,0.5:2:36,1:40:36,"/>
|
||||
<Variable Name="Sky light: Mie scattering" Value="40">
|
||||
<Spline Keys="0:40:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Rayleigh scattering" Value="0.20000002">
|
||||
<Spline Keys="0:0.2:36,0.229167:0.2:36,0.25:1:36,0.291667:0.2:36,0.5:0.2:36,0.729167:0.2:36,0.75:1:36,0.770833:0.2:36,1:0.2:36,"/>
|
||||
<Variable Name="Sky light: Rayleigh scattering" Value="0.2">
|
||||
<Spline Keys="0:0.2:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Sun anisotropy factor" Value="-0.99989998">
|
||||
<Spline Keys="0:-0.9999:36,0.25:-0.9999:36,0.5:-0.9999:65572,0.75:-0.9999:36,1:-0.9999:36,"/>
|
||||
<Spline Keys="0:-0.9999:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Wavelength (R)" Value="694">
|
||||
<Spline Keys="0:694:36,0.25:694:36,0.5:694:65572,0.75:694:36,1:694:36,"/>
|
||||
<Spline Keys="0:694:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Wavelength (G)" Value="596.99994">
|
||||
<Spline Keys="0:597:36,0.25:597:36,0.5:597:36,0.75:597:36,1:597:36,"/>
|
||||
<Variable Name="Sky light: Wavelength (G)" Value="597">
|
||||
<Spline Keys="0:597:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Wavelength (B)" Value="488">
|
||||
<Spline Keys="0:488:36,0.25:488:36,0.5:488:65572,0.75:488:36,1:488:36,"/>
|
||||
<Spline Keys="0:488:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Horizon color" Color="0.27049801,0.39157301,0.52711499">
|
||||
<Spline Keys="0:(0.270498:0.391573:0.520996):36,0.25:(0.270498:0.391573:0.527115):36,0.5:(0.270498:0.391573:0.527115):262180,0.75:(0.270498:0.391573:0.527115):36,1:(0.270498:0.391573:0.520996):36,"/>
|
||||
<Variable Name="Night sky: Horizon color" Color="0.27049801,0.39157301,0.52099597">
|
||||
<Spline Keys="0:(0.270498:0.391573:0.520996):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Horizon color multiplier" Value="0">
|
||||
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
|
||||
<Variable Name="Night sky: Horizon color multiplier" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Zenith color" Color="0.36130697,0.434154,0.46778399">
|
||||
<Spline Keys="0:(0.361307:0.434154:0.467784):36,0.25:(0.361307:0.434154:0.467784):36,0.5:(0.361307:0.434154:0.467784):262180,0.75:(0.361307:0.434154:0.467784):36,1:(0.361307:0.434154:0.467784):36,"/>
|
||||
<Variable Name="Night sky: Zenith color" Color="0.361307,0.434154,0.46778399">
|
||||
<Spline Keys="0:(0.361307:0.434154:0.467784):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Zenith color multiplier" Value="0">
|
||||
<Spline Keys="0:0.02:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.02:36,"/>
|
||||
<Variable Name="Night sky: Zenith color multiplier" Value="0.02">
|
||||
<Spline Keys="0:0.02:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Zenith shift" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Star intensity" Value="0">
|
||||
<Spline Keys="0:3:36,0.25:0:36,0.5:0:65572,0.75:0:36,0.836647:1.03977:36,1:3:36,"/>
|
||||
<Variable Name="Night sky: Star intensity" Value="3">
|
||||
<Spline Keys="0:3:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon color" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.5:(1:1:1):458788,0.75:(1:1:1):36,1:(1:1:1):36,"/>
|
||||
<Spline Keys="0:(1:1:1):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon color multiplier" Value="0">
|
||||
<Spline Keys="0:0.4:36,0.25:0:36,0.5:0:36,0.75:0:65572,1:0.4:36,"/>
|
||||
<Variable Name="Night sky: Moon color multiplier" Value="0.40000001">
|
||||
<Spline Keys="0:0.4:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon inner corona color" Color="0.904661,1,1">
|
||||
<Spline Keys="0:(0.89627:1:1):36,0.25:(0.904661:1:1):36,0.5:(0.904661:1:1):393252,0.75:(0.904661:1:1):36,0.836647:(0.89627:1:1):36,1:(0.89627:1:1):36,"/>
|
||||
<Variable Name="Night sky: Moon inner corona color" Color="0.89626998,1,1">
|
||||
<Spline Keys="0:(0.89627:1:1):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon inner corona color multiplier" Value="0">
|
||||
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
|
||||
<Variable Name="Night sky: Moon inner corona color multiplier" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon inner corona scale" Value="0">
|
||||
<Spline Keys="0:2:36,0.25:0:36,0.5:0:65572,0.75:0:36,0.836647:0.693178:36,1:2:36,"/>
|
||||
<Variable Name="Night sky: Moon inner corona scale" Value="2">
|
||||
<Spline Keys="0:2:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon outer corona color" Color="0.201556,0.22696599,0.25415203">
|
||||
<Spline Keys="0:(0.198069:0.226966:0.250158):36,0.25:(0.201556:0.226966:0.254152):36,0.5:(0.201556:0.226966:0.254152):36,0.75:(0.201556:0.226966:0.254152):36,1:(0.198069:0.226966:0.250158):36,"/>
|
||||
<Variable Name="Night sky: Moon outer corona color" Color="0.19806901,0.22696599,0.25015801">
|
||||
<Spline Keys="0:(0.198069:0.226966:0.250158):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon outer corona color multiplier" Value="0">
|
||||
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
|
||||
<Variable Name="Night sky: Moon outer corona color multiplier" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon outer corona scale" Value="0">
|
||||
<Spline Keys="0:0.01:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.01:36,"/>
|
||||
<Variable Name="Night sky: Moon outer corona scale" Value="0.0099999998">
|
||||
<Spline Keys="0:0.01:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun light multiplier" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun custom color" Color="0.83076996,0.76815104,0.65837508">
|
||||
<Spline Keys="0:(0.737911:0.737911:0.737911):36,0.25:(0.83077:0.768151:0.658375):36,0.5:(0.83077:0.768151:0.658375):458788,0.75:(0.83077:0.768151:0.658375):36,1:(0.737911:0.737911:0.737911):36,"/>
|
||||
<Variable Name="Cloud shading: Sun custom color" Color="0.73791099,0.73791099,0.73791099">
|
||||
<Spline Keys="0:(0.737911:0.737911:0.737911):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun custom color multiplier" Value="1">
|
||||
<Spline Keys="0:0.1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cloud shading: Sun custom color multiplier" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun custom color influence" Value="0">
|
||||
<Spline Keys="0:0.5:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.5:36,"/>
|
||||
<Variable Name="Cloud shading: Sun custom color influence" Value="0.5">
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun shafts visibility" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0:36,"/>
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays visibility" Value="1.5">
|
||||
<Spline Keys="0:1:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:1:36,"/>
|
||||
<Variable Name="Sun rays visibility" Value="1">
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays attenuation" Value="1.5">
|
||||
<Spline Keys="0:0.1:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:0.1:36,"/>
|
||||
<Variable Name="Sun rays attenuation" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays suncolor influence" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays custom color" Color="0.66538697,0.83879906,0.94730699">
|
||||
<Spline Keys="0:(0.665387:0.838799:0.947307):36,0.25:(0.665387:0.838799:0.947307):36,0.5:(0.665387:0.838799:0.947307):458788,0.75:(0.665387:0.838799:0.947307):36,1:(0.665387:0.838799:0.947307):36,"/>
|
||||
<Variable Name="Sun rays custom color" Color="0.66538697,0.838799,0.94730699">
|
||||
<Spline Keys="0:(0.665387:0.838799:0.947307):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Ocean fog color" Color="0.0012141101,0.0091340598,0.017642001">
|
||||
<Spline Keys="0:(0.00121411:0.00913406:0.017642):36,0.25:(0.00121411:0.00913406:0.017642):36,0.5:(0.00121411:0.00913406:0.017642):458788,0.75:(0.00121411:0.00913406:0.017642):36,1:(0.00121411:0.00913406:0.017642):36,"/>
|
||||
<Variable Name="Ocean fog color" Color="0.0012141099,0.0091340598,0.017642001">
|
||||
<Spline Keys="0:(0.00121411:0.00913406:0.017642):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Ocean fog color multiplier" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Ocean fog density" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Static skybox multiplier" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve shoulder scale" Value="2.232213">
|
||||
<Spline Keys="0:3:36,0.229167:3:36,0.5:2:36,0.770833:3:36,1:3:36,"/>
|
||||
<Variable Name="Film curve shoulder scale" Value="3">
|
||||
<Spline Keys="0:3:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve midtones scale" Value="0.88389361">
|
||||
<Spline Keys="0:0.5:36,0.229167:0.5:36,0.5:1:36,0.770833:0.5:36,1:0.5:36,"/>
|
||||
<Variable Name="Film curve midtones scale" Value="0.5">
|
||||
<Spline Keys="0:0.5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve toe scale" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve whitepoint" Value="4">
|
||||
<Spline Keys="0:4:36,0.25:4:36,0.5:4:65572,0.75:4:36,1:4:36,"/>
|
||||
<Spline Keys="0:4:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Saturation" Value="1">
|
||||
<Spline Keys="0:0.8:36,0.229167:0.8:36,0.5:1:36,0.751391:1:65572,0.770833:0.8:36,1:0.8:36,"/>
|
||||
<Variable Name="Saturation" Value="0.80000001">
|
||||
<Spline Keys="0:0.8:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Color balance" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.5:(1:1:1):36,0.75:(1:1:1):36,1:(1:1:1):36,"/>
|
||||
<Spline Keys="0:(1:1:1):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Scene key" Value="0.18000002">
|
||||
<Spline Keys="0:0.18:36,0.25:0.18:36,0.5:0.18:65572,0.75:0.18:36,1:0.18:36,"/>
|
||||
<Variable Name="Scene key" Value="0.18000001">
|
||||
<Spline Keys="0:0.18:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Min exposure" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Max exposure" Value="2.6142297">
|
||||
<Spline Keys="0:2:36,0.229167:2:36,0.5:2.8:36,0.770833:2:36,1:2:36,"/>
|
||||
<Variable Name="Max exposure" Value="2">
|
||||
<Spline Keys="0:2:36"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Min" Value="4.5">
|
||||
<Spline Keys="0:4.5:0,1:4.5:0,"/>
|
||||
<Spline Keys="0:4.5:0"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Max" Value="17">
|
||||
<Spline Keys="0:17:0,1:17:0,"/>
|
||||
<Spline Keys="0:17:0"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Auto compensation" Value="1.5">
|
||||
<Spline Keys="0:1.5:0,1:1.5:0,"/>
|
||||
<Spline Keys="0:1.5:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Bloom amount" Value="0.30899152">
|
||||
<Spline Keys="0:1:36,0.229167:1:36,0.5:0.1:36,0.770833:1:36,1:1:36,"/>
|
||||
<Variable Name="Bloom amount" Value="1">
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Filters: grain" Value="0">
|
||||
<Spline Keys="0:0.3:65572,0.229167:0.3:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0.3:36,"/>
|
||||
<Variable Name="Filters: grain" Value="0.30000001">
|
||||
<Spline Keys="0:0.3:65572"/>
|
||||
</Variable>
|
||||
<Variable Name="Filters: photofilter color" Color="0,0,0">
|
||||
<Spline Keys="0:(0:0:0):36,0.25:(0:0:0):36,0.5:(0:0:0):458788,0.75:(0:0:0):36,1:(0:0:0):36,"/>
|
||||
<Spline Keys="0:(0:0:0):36"/>
|
||||
</Variable>
|
||||
<Variable Name="Filters: photofilter density" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Dof: focus range" Value="500.00003">
|
||||
<Spline Keys="0:500:36,0.25:500:36,0.5:500:65572,0.75:500:36,1:500:36,"/>
|
||||
<Variable Name="Dof: focus range" Value="500">
|
||||
<Spline Keys="0:500:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Dof: blur amount" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Dof: blur amount" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 0: Bias" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cascade 0: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 0: Slope Bias" Value="64">
|
||||
<Spline Keys="0:64:36,0.25:64:36,0.5:64:65572,0.75:64:36,1:64:36,"/>
|
||||
<Spline Keys="0:64:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 1: Bias" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cascade 1: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 1: Slope Bias" Value="23">
|
||||
<Spline Keys="0:23:36,0.25:23:36,0.5:23:65572,0.75:23:36,1:23:36,"/>
|
||||
<Spline Keys="0:23:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 2: Bias" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cascade 2: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 2: Slope Bias" Value="4">
|
||||
<Spline Keys="0:4:36,0.25:4:36,0.5:4:65572,0.75:4:36,1:4:36,"/>
|
||||
<Spline Keys="0:4:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 3: Bias" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cascade 3: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 3: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 4: Bias" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cascade 4: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 4: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 5: Bias" Value="0.0099999998">
|
||||
<Spline Keys="0:0.01:0,0.25:0.01:36,0.5:0.01:65572,0.75:0.01:36,1:0.01:36,"/>
|
||||
<Spline Keys="0:0.01:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 5: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 6: Bias" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cascade 6: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 6: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 7: Bias" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
|
||||
<Variable Name="Cascade 7: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 7: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
<Spline Keys="0:1:0"/>
|
||||
</Variable>
|
||||
<Variable Name="Shadow jittering" Value="2.4999998">
|
||||
<Spline Keys="0:5:36,0.25:2.5:36,0.5:2.5:65572,0.75:2.5:36,1:5:0,"/>
|
||||
<Variable Name="Shadow jittering" Value="5">
|
||||
<Spline Keys="0:5:36"/>
|
||||
</Variable>
|
||||
<Variable Name="HDR dynamic power factor" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0:36,"/>
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky brightening (terrain occlusion)" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
|
||||
<Spline Keys="0:0:36"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun color multiplier" Value="9.999999">
|
||||
<Spline Keys="0:0.1:36,0.25:10:36,0.5:10:36,0.75:10:36,1:0.1:36,"/>
|
||||
<Variable Name="Sun color multiplier" Value="0.1">
|
||||
<Spline Keys="0:0.1:36"/>
|
||||
</Variable>
|
||||
</TimeOfDay>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c96e192861177f27edcd4dde87612645f328cb4d53ee31fb188cb75a0da7496b
|
||||
size 9974
|
||||
oid sha256:1f42344cdf0092eac6fc43bff66a2e0d9706511865da89490abfb2d054a1b5db
|
||||
size 9647
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Amazon": {
|
||||
"Preferences": {
|
||||
"EnablePrefabSystem": false
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@
|
||||
<ObjectStream version="3">
|
||||
<Class name="MaterialLibraryAsset" version="2" type="{9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F}">
|
||||
<Class name="AssetData" field="BaseClass1" version="1" type="{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}"/>
|
||||
<Class name="AZStd::vector" field="Properties" type="{A8E59F8C-2F9A-525A-B549-A9E197EB9632}">
|
||||
<Class name="MaterialFromAssetConfiguration" field="element" version="1" type="{FBD76628-DE57-435E-BE00-6FFAE64DDF1D}">
|
||||
<Class name="MaterialConfiguration" field="Configuration" version="2" type="{8807CAA1-AD08-4238-8FDB-2154ADD084A1}">
|
||||
<Class name="AZStd::string" field="SurfaceType" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
<Class name="float" field="DynamicFriction" value="0.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
<Class name="float" field="StaticFriction" value="0.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
<Class name="float" field="Restitution" value="0.0000000" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
|
||||
<Class name="unsigned char" field="FrictionCombine" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="unsigned char" field="RestitutionCombine" value="0" type="{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}"/>
|
||||
<Class name="Color" field="DebugColor" value="1.0000000 1.0000000 1.0000000 1.0000000" type="{7894072A-9050-4F0F-901B-34B1A0D29417}"/>
|
||||
</Class>
|
||||
<Class name="MaterialId" field="UID" version="1" type="{744CCE6C-9F69-4E2F-B950-DAB8514F870B}">
|
||||
<Class name="AZ::Uuid" field="MaterialId" value="{B072A405-BAFA-4B0A-9164-B3A424E642A9}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</Class>
|
||||
</ObjectStream>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,709 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "CrySystem_precompiled.h"
|
||||
#include "SpawnableLevelSystem.h"
|
||||
#include <IAudioSystem.h>
|
||||
#include "IMovieSystem.h"
|
||||
#include <IResourceManager.h>
|
||||
#include "IDeferredCollisionEvent.h"
|
||||
|
||||
#include <LoadScreenBus.h>
|
||||
|
||||
#include <AzCore/Debug/AssetTracking.h>
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzFramework/IO/FileOperations.h>
|
||||
#include <AzFramework/Entity/GameEntityContextBus.h>
|
||||
#include <AzFramework/Input/Buses/Requests/InputChannelRequestBus.h>
|
||||
|
||||
#include "MainThreadRenderRequestBus.h"
|
||||
#include <LyShine/ILyShine.h>
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
|
||||
#include <AzCore/Script/ScriptSystemBus.h>
|
||||
|
||||
namespace LegacyLevelSystem
|
||||
{
|
||||
//------------------------------------------------------------------------
|
||||
static void LoadLevel(const AZ::ConsoleCommandContainer& arguments)
|
||||
{
|
||||
AZ_Error("SpawnableLevelSystem", arguments.empty(), "LoadLevel requires a level file name to be provided.");
|
||||
AZ_Error("SpawnableLevelSystem", arguments.size() > 1, "LoadLevel requires a single level file name to be provided.");
|
||||
|
||||
if (!arguments.empty() && gEnv->pSystem && gEnv->pSystem->GetILevelSystem() && !gEnv->IsEditor())
|
||||
{
|
||||
gEnv->pSystem->GetILevelSystem()->LoadLevel(arguments[0].data());
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static void UnloadLevel([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments)
|
||||
{
|
||||
AZ_Warning("SpawnableLevelSystem", !arguments.empty(), "UnloadLevel doesn't use any arguments.");
|
||||
|
||||
if (gEnv->pSystem && gEnv->pSystem->GetILevelSystem() && !gEnv->IsEditor())
|
||||
{
|
||||
gEnv->pSystem->GetILevelSystem()->UnloadLevel();
|
||||
if (gEnv->p3DEngine)
|
||||
{
|
||||
gEnv->p3DEngine->LoadEmptyLevel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AZ_CONSOLEFREEFUNC(LoadLevel, AZ::ConsoleFunctorFlags::Null, "Unloads the current level and loads a new one with the given asset name");
|
||||
AZ_CONSOLEFREEFUNC(UnloadLevel, AZ::ConsoleFunctorFlags::Null, "Unloads the current level");
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
SpawnableLevelSystem::SpawnableLevelSystem(ISystem* pSystem)
|
||||
: m_pSystem(pSystem)
|
||||
{
|
||||
LOADING_TIME_PROFILE_SECTION;
|
||||
CRY_ASSERT(pSystem);
|
||||
|
||||
m_fLastLevelLoadTime = 0;
|
||||
m_fLastTime = 0;
|
||||
m_bLevelLoaded = false;
|
||||
|
||||
m_levelLoadStartTime.SetValue(0);
|
||||
m_nLoadedLevelsCount = 0;
|
||||
|
||||
AZ_Assert(gEnv && gEnv->pCryPak, "gEnv and CryPak must be initialized for loading levels.");
|
||||
if (!gEnv || !gEnv->pCryPak)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto pPak = gEnv->pCryPak;
|
||||
|
||||
AzFramework::RootSpawnableNotificationBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
SpawnableLevelSystem::~SpawnableLevelSystem()
|
||||
{
|
||||
AzFramework::RootSpawnableNotificationBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
void SpawnableLevelSystem::Release()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
bool SpawnableLevelSystem::IsLevelLoaded()
|
||||
{
|
||||
return m_bLevelLoaded;
|
||||
}
|
||||
|
||||
const char* SpawnableLevelSystem::GetCurrentLevelName() const
|
||||
{
|
||||
return m_bLevelLoaded ? m_lastLevelName.c_str() : "";
|
||||
}
|
||||
|
||||
// If the level load failed then we need to have a different shutdown procedure vs when a level is naturally unloaded
|
||||
void SpawnableLevelSystem::SetLevelLoadFailed(bool loadFailed)
|
||||
{
|
||||
m_levelLoadFailed = loadFailed;
|
||||
}
|
||||
|
||||
bool SpawnableLevelSystem::GetLevelLoadFailed()
|
||||
{
|
||||
return m_levelLoadFailed;
|
||||
}
|
||||
|
||||
AZ::Data::AssetType SpawnableLevelSystem::GetLevelAssetType() const
|
||||
{
|
||||
return azrtti_typeid<AzFramework::Spawnable>();
|
||||
}
|
||||
|
||||
// The following methods are deprecated from ILevelSystem and will be removed once slice support is removed.
|
||||
|
||||
// [LYN-2376] Remove once legacy slice support is removed
|
||||
void SpawnableLevelSystem::Rescan([[maybe_unused]] const char* levelsFolder)
|
||||
{
|
||||
AZ_Assert(false, "Rescan - No longer supported.");
|
||||
}
|
||||
|
||||
// [LYN-2376] Remove once legacy slice support is removed
|
||||
int SpawnableLevelSystem::GetLevelCount()
|
||||
{
|
||||
AZ_Assert(false, "GetLevelCount - No longer supported.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// [LYN-2376] Remove once legacy slice support is removed
|
||||
ILevelInfo* SpawnableLevelSystem::GetLevelInfo([[maybe_unused]] int level)
|
||||
{
|
||||
AZ_Assert(false, "GetLevelInfo - No longer supported.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// [LYN-2376] Remove once legacy slice support is removed
|
||||
ILevelInfo* SpawnableLevelSystem::GetLevelInfo([[maybe_unused]] const char* levelName)
|
||||
{
|
||||
AZ_Assert(false, "GetLevelInfo - No longer supported.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::AddListener(ILevelSystemListener* pListener)
|
||||
{
|
||||
AZStd::vector<ILevelSystemListener*>::iterator it = AZStd::find(m_listeners.begin(), m_listeners.end(), pListener);
|
||||
|
||||
if (it == m_listeners.end())
|
||||
{
|
||||
m_listeners.push_back(pListener);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::RemoveListener(ILevelSystemListener* pListener)
|
||||
{
|
||||
AZStd::vector<ILevelSystemListener*>::iterator it = AZStd::find(m_listeners.begin(), m_listeners.end(), pListener);
|
||||
|
||||
if (it != m_listeners.end())
|
||||
{
|
||||
m_listeners.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
bool SpawnableLevelSystem::LoadLevel(const char* levelName)
|
||||
{
|
||||
if (gEnv->IsEditor())
|
||||
{
|
||||
AZ_TracePrintf("CrySystem::CLevelSystem", "LoadLevel for %s was called in the editor - not actually loading.\n", levelName);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If a level is currently loaded, unload it before loading the next one.
|
||||
if (IsLevelLoaded())
|
||||
{
|
||||
UnloadLevel();
|
||||
}
|
||||
|
||||
gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_PREPARE, 0, 0);
|
||||
PrepareNextLevel(levelName);
|
||||
|
||||
bool result = LoadLevelInternal(levelName);
|
||||
if (result)
|
||||
{
|
||||
OnLoadingComplete(levelName);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
bool SpawnableLevelSystem::LoadLevelInternal(const char* levelName)
|
||||
{
|
||||
gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_START);
|
||||
AZ_ASSET_NAMED_SCOPE("Level: %s", levelName);
|
||||
|
||||
INDENT_LOG_DURING_SCOPE();
|
||||
|
||||
AZ::Data::AssetId rootSpawnableAssetId;
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(
|
||||
rootSpawnableAssetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, levelName, nullptr, false);
|
||||
if (!rootSpawnableAssetId.IsValid())
|
||||
{
|
||||
OnLoadingError(levelName, "AssetCatalog has no entry for the requested level.");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// This scope is specifically used for marking a loading time profile section
|
||||
{
|
||||
LOADING_TIME_PROFILE_SECTION;
|
||||
|
||||
m_bLevelLoaded = false;
|
||||
m_lastLevelName = levelName;
|
||||
gEnv->pConsole->SetScrollMax(600);
|
||||
ICVar* con_showonload = gEnv->pConsole->GetCVar("con_showonload");
|
||||
if (con_showonload && con_showonload->GetIVal() != 0)
|
||||
{
|
||||
gEnv->pConsole->ShowConsole(true);
|
||||
ICVar* g_enableloadingscreen = gEnv->pConsole->GetCVar("g_enableloadingscreen");
|
||||
if (g_enableloadingscreen)
|
||||
{
|
||||
g_enableloadingscreen->Set(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the camera to (1,1,1) (not (0,0,0) which is the invalid/uninitialised state,
|
||||
// to avoid the hack in the renderer to not show anything if the camera is at the origin).
|
||||
CCamera defaultCam;
|
||||
defaultCam.SetPosition(Vec3(1.0f));
|
||||
m_pSystem->SetViewCamera(defaultCam);
|
||||
|
||||
OnLoadingStart(levelName);
|
||||
|
||||
auto pPak = gEnv->pCryPak;
|
||||
|
||||
m_pSystem->SetThreadState(ESubsys_Physics, false);
|
||||
|
||||
ICVar* pSpamDelay = gEnv->pConsole->GetCVar("log_SpamDelay");
|
||||
float spamDelay = 0.0f;
|
||||
if (pSpamDelay)
|
||||
{
|
||||
spamDelay = pSpamDelay->GetFVal();
|
||||
pSpamDelay->Set(0.0f);
|
||||
}
|
||||
|
||||
if (gEnv->p3DEngine)
|
||||
{
|
||||
AZ::IO::PathView levelPath(levelName);
|
||||
AZStd::string parentPath(levelPath.ParentPath().Native());
|
||||
|
||||
static constexpr const char* defaultGameTypeName = "Mission0";
|
||||
bool is3DEngineLoaded = gEnv->IsEditor() ? gEnv->p3DEngine->InitLevelForEditor(parentPath.c_str(), defaultGameTypeName)
|
||||
: gEnv->p3DEngine->LoadLevel(parentPath.c_str(), defaultGameTypeName);
|
||||
if (!is3DEngineLoaded)
|
||||
{
|
||||
OnLoadingError(levelName, "3DEngine failed to handle loading the level");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Parse level specific config data.
|
||||
AZStd::string const sLevelNameOnly(PathUtil::GetFileName(levelName));
|
||||
|
||||
if (!sLevelNameOnly.empty())
|
||||
{
|
||||
const char* controlsPath = nullptr;
|
||||
Audio::AudioSystemRequestBus::BroadcastResult(controlsPath, &Audio::AudioSystemRequestBus::Events::GetControlsPath);
|
||||
if (controlsPath)
|
||||
{
|
||||
AZStd::string sAudioLevelPath(controlsPath);
|
||||
sAudioLevelPath.append("levels/");
|
||||
sAudioLevelPath += sLevelNameOnly;
|
||||
|
||||
Audio::SAudioManagerRequestData<Audio::eAMRT_PARSE_CONTROLS_DATA> oAMData(
|
||||
sAudioLevelPath.c_str(), Audio::eADS_LEVEL_SPECIFIC);
|
||||
Audio::SAudioRequest oAudioRequestData;
|
||||
oAudioRequestData.nFlags =
|
||||
(Audio::eARF_PRIORITY_HIGH |
|
||||
Audio::eARF_EXECUTE_BLOCKING); // Needs to be blocking so data is available for next preloading request!
|
||||
oAudioRequestData.pData = &oAMData;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
|
||||
Audio::SAudioManagerRequestData<Audio::eAMRT_PARSE_PRELOADS_DATA> oAMData2(
|
||||
sAudioLevelPath.c_str(), Audio::eADS_LEVEL_SPECIFIC);
|
||||
oAudioRequestData.pData = &oAMData2;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
|
||||
Audio::TAudioPreloadRequestID nPreloadRequestID = INVALID_AUDIO_PRELOAD_REQUEST_ID;
|
||||
|
||||
Audio::AudioSystemRequestBus::BroadcastResult(
|
||||
nPreloadRequestID, &Audio::AudioSystemRequestBus::Events::GetAudioPreloadRequestID, sLevelNameOnly.c_str());
|
||||
if (nPreloadRequestID != INVALID_AUDIO_PRELOAD_REQUEST_ID)
|
||||
{
|
||||
Audio::SAudioManagerRequestData<Audio::eAMRT_PRELOAD_SINGLE_REQUEST> requestData(nPreloadRequestID, true);
|
||||
oAudioRequestData.pData = &requestData;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AZ::Data::Asset<AzFramework::Spawnable> rootSpawnable(
|
||||
rootSpawnableAssetId, azrtti_typeid<AzFramework::Spawnable>(), levelName);
|
||||
|
||||
m_rootSpawnableId = rootSpawnableAssetId;
|
||||
m_rootSpawnableGeneration = AzFramework::RootSpawnableInterface::Get()->AssignRootSpawnable(rootSpawnable);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Movie system must be reset after entities.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
IMovieSystem* movieSys = gEnv->pMovieSystem;
|
||||
if (movieSys != NULL)
|
||||
{
|
||||
// bSeekAllToStart needs to be false here as it's only of interest in the editor
|
||||
movieSys->Reset(true, false);
|
||||
}
|
||||
|
||||
gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_START_PRECACHE);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Notify 3D engine that loading finished
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if (gEnv->p3DEngine)
|
||||
{
|
||||
gEnv->p3DEngine->PostLoadLevel();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
gEnv->pConsole->SetScrollMax(600 / 2);
|
||||
|
||||
pPak->GetResourceList(AZ::IO::IArchive::RFOM_NextLevel)->Clear();
|
||||
|
||||
if (pSpamDelay)
|
||||
{
|
||||
pSpamDelay->Set(spamDelay);
|
||||
}
|
||||
|
||||
m_bLevelLoaded = true;
|
||||
gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_END);
|
||||
}
|
||||
|
||||
GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_END, 0, 0);
|
||||
|
||||
if (auto cvar = gEnv->pConsole->GetCVar("sv_map"); cvar)
|
||||
{
|
||||
cvar->Set(levelName);
|
||||
}
|
||||
|
||||
gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_PRECACHE_START, 0, 0);
|
||||
|
||||
m_pSystem->SetThreadState(ESubsys_Physics, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::PrepareNextLevel(const char* levelName)
|
||||
{
|
||||
AZ::Data::AssetId rootSpawnableAssetId;
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(
|
||||
rootSpawnableAssetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, levelName, nullptr, false);
|
||||
if (!rootSpawnableAssetId.IsValid())
|
||||
{
|
||||
// alert the listener
|
||||
OnLevelNotFound(levelName);
|
||||
return;
|
||||
}
|
||||
|
||||
// This work not required in-editor.
|
||||
if (!gEnv || !gEnv->IsEditor())
|
||||
{
|
||||
m_levelLoadStartTime = gEnv->pTimer->GetAsyncTime();
|
||||
|
||||
// switched to level heap, so now imm start the loading screen (renderer will be reinitialized in the levelheap)
|
||||
gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START_LOADINGSCREEN, 0, 0);
|
||||
gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_START_PREPARE);
|
||||
}
|
||||
|
||||
OnPrepareNextLevel(levelName);
|
||||
}
|
||||
|
||||
void SpawnableLevelSystem::OnPrepareNextLevel(const char* levelName)
|
||||
{
|
||||
AZ_TracePrintf("LevelSystem", "Level system is preparing to load '%s'\n", levelName);
|
||||
|
||||
for (auto& listener : m_listeners)
|
||||
{
|
||||
listener->OnPrepareNextLevel(levelName);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::OnLevelNotFound(const char* levelName)
|
||||
{
|
||||
AZ_Error("LevelSystem", false, "Requested level not found: '%s'\n", levelName);
|
||||
|
||||
for (auto& listener : m_listeners)
|
||||
{
|
||||
listener->OnLevelNotFound(levelName);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::OnLoadingStart(const char* levelName)
|
||||
{
|
||||
AZ_TracePrintf("LevelSystem", "Level system is loading '%s'\n", levelName);
|
||||
|
||||
if (gEnv->pCryPak->GetRecordFileOpenList() == AZ::IO::IArchive::RFOM_EngineStartup)
|
||||
{
|
||||
gEnv->pCryPak->RecordFileOpen(AZ::IO::IArchive::RFOM_Level);
|
||||
}
|
||||
|
||||
m_fLastTime = gEnv->pTimer->GetAsyncCurTime();
|
||||
|
||||
GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0);
|
||||
|
||||
LOADING_TIME_PROFILE_SECTION(gEnv->pSystem);
|
||||
|
||||
for (auto& listener : m_listeners)
|
||||
{
|
||||
listener->OnLoadingStart(levelName);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::OnLoadingError(const char* levelName, const char* error)
|
||||
{
|
||||
AZ_Error("LevelSystem", false, "Error loading level '%s': %s\n", levelName, error);
|
||||
|
||||
if (gEnv->pRenderer)
|
||||
{
|
||||
gEnv->pRenderer->SetTexturePrecaching(false);
|
||||
}
|
||||
|
||||
for (auto& listener : m_listeners)
|
||||
{
|
||||
listener->OnLoadingError(levelName, error);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::OnLoadingComplete(const char* levelName)
|
||||
{
|
||||
CTimeValue t = gEnv->pTimer->GetAsyncTime();
|
||||
m_fLastLevelLoadTime = (t - m_levelLoadStartTime).GetSeconds();
|
||||
|
||||
LogLoadingTime();
|
||||
|
||||
m_nLoadedLevelsCount++;
|
||||
|
||||
// Hide console after loading.
|
||||
gEnv->pConsole->ShowConsole(false);
|
||||
|
||||
for (auto& listener : m_listeners)
|
||||
{
|
||||
listener->OnLoadingComplete(levelName);
|
||||
}
|
||||
|
||||
#if AZ_LOADSCREENCOMPONENT_ENABLED
|
||||
EBUS_EVENT(LoadScreenBus, Stop);
|
||||
#endif // if AZ_LOADSCREENCOMPONENT_ENABLED
|
||||
|
||||
AZ_TracePrintf("LevelSystem", "Level load complete: '%s'\n", levelName);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::OnLoadingProgress(const char* levelName, int progressAmount)
|
||||
{
|
||||
for (auto& listener : m_listeners)
|
||||
{
|
||||
listener->OnLoadingProgress(levelName, progressAmount);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void SpawnableLevelSystem::OnUnloadComplete(const char* levelName)
|
||||
{
|
||||
for (auto& listener : m_listeners)
|
||||
{
|
||||
listener->OnUnloadComplete(levelName);
|
||||
}
|
||||
|
||||
AZ_TracePrintf("LevelSystem", "Level unload complete: '%s'\n", levelName);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void SpawnableLevelSystem::LogLoadingTime()
|
||||
{
|
||||
if (gEnv->IsEditor())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GetISystem()->IsDevMode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
char vers[128];
|
||||
GetISystem()->GetFileVersion().ToString(vers, sizeof(vers));
|
||||
|
||||
const char* sChain = "";
|
||||
if (m_nLoadedLevelsCount > 0)
|
||||
{
|
||||
sChain = " (Chained)";
|
||||
}
|
||||
|
||||
AZStd::string text;
|
||||
text.format(
|
||||
"Game Level Load Time: [%s] Level %s loaded in %.2f seconds%s", vers, m_lastLevelName.c_str(), m_fLastLevelLoadTime, sChain);
|
||||
gEnv->pLog->Log(text.c_str());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void SpawnableLevelSystem::UnloadLevel()
|
||||
{
|
||||
if (gEnv->IsEditor())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_lastLevelName.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_TracePrintf("LevelSystem", "UnloadLevel Start\n");
|
||||
INDENT_LOG_DURING_SCOPE();
|
||||
|
||||
// Flush core buses. We're about to unload Cry modules and need to ensure we don't have module-owned functions left behind.
|
||||
AZ::Data::AssetBus::ExecuteQueuedEvents();
|
||||
AZ::TickBus::ExecuteQueuedEvents();
|
||||
AZ::MainThreadRenderRequestBus::ExecuteQueuedEvents();
|
||||
|
||||
if (gEnv && gEnv->pSystem)
|
||||
{
|
||||
// clear all error messages to prevent stalling due to runtime file access check during chainloading
|
||||
gEnv->pSystem->ClearErrorMessages();
|
||||
}
|
||||
|
||||
if (gEnv && gEnv->pCryPak)
|
||||
{
|
||||
gEnv->pCryPak->DisableRuntimeFileAccess(false);
|
||||
}
|
||||
|
||||
CTimeValue tBegin = gEnv->pTimer->GetAsyncTime();
|
||||
|
||||
I3DEngine* p3DEngine = gEnv->p3DEngine;
|
||||
if (p3DEngine)
|
||||
{
|
||||
IDeferredPhysicsEventManager* pPhysEventManager = p3DEngine->GetDeferredPhysicsEventManager();
|
||||
if (pPhysEventManager)
|
||||
{
|
||||
// clear deferred physics queues before renderer, since we could have jobs running
|
||||
// which access a rendermesh
|
||||
pPhysEventManager->ClearDeferredEvents();
|
||||
}
|
||||
}
|
||||
|
||||
// AM: Flush render thread (Flush is not exposed - using EndFrame())
|
||||
// We are about to delete resources that could be in use
|
||||
if (gEnv->pRenderer)
|
||||
{
|
||||
gEnv->pRenderer->EndFrame();
|
||||
|
||||
bool isLoadScreenPlaying = false;
|
||||
#if AZ_LOADSCREENCOMPONENT_ENABLED
|
||||
LoadScreenBus::BroadcastResult(isLoadScreenPlaying, &LoadScreenBus::Events::IsPlaying);
|
||||
#endif // if AZ_LOADSCREENCOMPONENT_ENABLED
|
||||
|
||||
// force a black screen as last render command.
|
||||
// if load screen is playing do not call this draw as it may lead to a crash due to UI loading code getting
|
||||
// pumped while loading the shaders for this draw.
|
||||
if (!isLoadScreenPlaying)
|
||||
{
|
||||
gEnv->pRenderer->BeginFrame();
|
||||
gEnv->pRenderer->SetState(GS_BLSRC_SRCALPHA | GS_BLDST_ONEMINUSSRCALPHA | GS_NODEPTHTEST);
|
||||
gEnv->pRenderer->Draw2dImage(0, 0, 800, 600, -1, 0.0f, 0.0f, 1.0f, 1.0f, 0.f, 0.0f, 0.0f, 0.0f, 1.0, 0.f);
|
||||
gEnv->pRenderer->EndFrame();
|
||||
}
|
||||
|
||||
// flush any outstanding texture requests
|
||||
gEnv->pRenderer->FlushPendingTextureTasks();
|
||||
}
|
||||
|
||||
// Clear level entities and prefab instances.
|
||||
EBUS_EVENT(AzFramework::GameEntityContextRequestBus, ResetGameContext);
|
||||
|
||||
if (gEnv->pMovieSystem)
|
||||
{
|
||||
gEnv->pMovieSystem->Reset(false, false);
|
||||
gEnv->pMovieSystem->RemoveAllSequences();
|
||||
}
|
||||
|
||||
// Unload level specific audio binary data.
|
||||
Audio::SAudioManagerRequestData<Audio::eAMRT_UNLOAD_AFCM_DATA_BY_SCOPE> oAMData(Audio::eADS_LEVEL_SPECIFIC);
|
||||
Audio::SAudioRequest oAudioRequestData;
|
||||
oAudioRequestData.nFlags = (Audio::eARF_PRIORITY_HIGH | Audio::eARF_EXECUTE_BLOCKING);
|
||||
oAudioRequestData.pData = &oAMData;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
|
||||
// Now unload level specific audio config data.
|
||||
Audio::SAudioManagerRequestData<Audio::eAMRT_CLEAR_CONTROLS_DATA> oAMData2(Audio::eADS_LEVEL_SPECIFIC);
|
||||
oAudioRequestData.pData = &oAMData2;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
|
||||
Audio::SAudioManagerRequestData<Audio::eAMRT_CLEAR_PRELOADS_DATA> oAMData3(Audio::eADS_LEVEL_SPECIFIC);
|
||||
oAudioRequestData.pData = &oAMData3;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
|
||||
// Reset the camera to (0,0,0) which is the invalid/uninitialised state
|
||||
CCamera defaultCam;
|
||||
m_pSystem->SetViewCamera(defaultCam);
|
||||
|
||||
OnUnloadComplete(m_lastLevelName.c_str());
|
||||
|
||||
AzFramework::RootSpawnableInterface::Get()->ReleaseRootSpawnable();
|
||||
|
||||
m_lastLevelName.clear();
|
||||
|
||||
GetISystem()->GetIResourceManager()->UnloadLevel();
|
||||
|
||||
/*
|
||||
Force Lua garbage collection before p3DEngine->UnloadLevel() and pRenderer->FreeResources(flags) are called.
|
||||
p3DEngine->UnloadLevel() will destroy particle emitters even if they're still referenced by Lua objects that are yet to be
|
||||
collected. (as per comment in 3dEngineLoad.cpp (line 501) - "Force to clean all particles that are left, even if still referenced.").
|
||||
Then, during the next GC cycle, Lua finally cleans up, the particle emitter smart pointers will be pointing to invalid memory).
|
||||
Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event), which is too late
|
||||
(after the render resources have been purged).
|
||||
This extra GC step takes a few ms more level unload time, which is a small price for fixing nasty crashes.
|
||||
If, however, we wanted to claim it back, we could potentially get rid of the GC step that is triggered by
|
||||
ESYSTEM_EVENT_LEVEL_POST_UNLOAD to break even.
|
||||
*/
|
||||
|
||||
EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect);
|
||||
|
||||
// Delete engine resources
|
||||
if (p3DEngine)
|
||||
{
|
||||
p3DEngine->UnloadLevel();
|
||||
}
|
||||
// Force to clean render resources left after deleting all objects and materials.
|
||||
IRenderer* pRenderer = gEnv->pRenderer;
|
||||
if (pRenderer)
|
||||
{
|
||||
pRenderer->FlushRTCommands(true, true, true);
|
||||
|
||||
CryComment("Deleting Render meshes, render resources and flush texture streaming");
|
||||
// This may also release some of the materials.
|
||||
int flags = FRR_DELETED_MESHES | FRR_FLUSH_TEXTURESTREAMING | FRR_OBJECTS | FRR_RENDERELEMENTS | FRR_RP_BUFFERS | FRR_POST_EFFECTS;
|
||||
|
||||
// Always keep the system resources around in the editor.
|
||||
// If a level load fails for any reason, then do not unload the system resources, otherwise we will not have any system resources to
|
||||
// continue rendering the console and debug output text.
|
||||
if (!gEnv->IsEditor() && !GetLevelLoadFailed())
|
||||
{
|
||||
flags |= FRR_SYSTEM_RESOURCES;
|
||||
}
|
||||
|
||||
pRenderer->FreeResources(flags);
|
||||
CryComment("done");
|
||||
}
|
||||
|
||||
// Perform level unload procedures for the LyShine UI system
|
||||
if (gEnv && gEnv->pLyShine)
|
||||
{
|
||||
gEnv->pLyShine->OnLevelUnload();
|
||||
}
|
||||
|
||||
m_bLevelLoaded = false;
|
||||
|
||||
CTimeValue tUnloadTime = gEnv->pTimer->GetAsyncTime() - tBegin;
|
||||
AZ_TracePrintf("LevelSystem", "UnloadLevel End: %.1f sec\n", tUnloadTime.GetSeconds());
|
||||
|
||||
// Must be sent last.
|
||||
// Cleanup all containers
|
||||
GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_POST_UNLOAD, 0, 0);
|
||||
AzFramework::InputChannelRequestBus::Broadcast(&AzFramework::InputChannelRequests::ResetState);
|
||||
}
|
||||
|
||||
void SpawnableLevelSystem::OnRootSpawnableAssigned(
|
||||
[[maybe_unused]] AZ::Data::Asset<AzFramework::Spawnable> rootSpawnable, [[maybe_unused]] uint32_t generation)
|
||||
{
|
||||
}
|
||||
|
||||
void SpawnableLevelSystem::OnRootSpawnableReleased([[maybe_unused]] uint32_t generation)
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace LegacyLevelSystem
|
||||
@ -0,0 +1,93 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ILevelSystem.h"
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzFramework/Archive/IArchive.h>
|
||||
#include <AzFramework/Spawnable/RootSpawnableInterface.h>
|
||||
|
||||
namespace LegacyLevelSystem
|
||||
{
|
||||
|
||||
class SpawnableLevelSystem
|
||||
: public ILevelSystem
|
||||
, public AzFramework::RootSpawnableNotificationBus::Handler
|
||||
{
|
||||
public:
|
||||
explicit SpawnableLevelSystem(ISystem* pSystem);
|
||||
~SpawnableLevelSystem() override;
|
||||
|
||||
// ILevelSystem
|
||||
void Release() override;
|
||||
|
||||
void AddListener(ILevelSystemListener* pListener) override;
|
||||
void RemoveListener(ILevelSystemListener* pListener) override;
|
||||
|
||||
bool LoadLevel(const char* levelName) override;
|
||||
void UnloadLevel() override;
|
||||
bool IsLevelLoaded() override;
|
||||
const char* GetCurrentLevelName() const override;
|
||||
|
||||
// If the level load failed then we need to have a different shutdown procedure vs when a level is naturally unloaded
|
||||
void SetLevelLoadFailed(bool loadFailed) override;
|
||||
bool GetLevelLoadFailed() override;
|
||||
AZ::Data::AssetType GetLevelAssetType() const override;
|
||||
|
||||
// The following methods are deprecated from ILevelSystem and will be removed once slice support is removed.
|
||||
|
||||
// [LYN-2376] Remove once legacy slice support is removed
|
||||
void Rescan([[maybe_unused]] const char* levelsFolder) override;
|
||||
int GetLevelCount() override;
|
||||
ILevelInfo* GetLevelInfo([[maybe_unused]] int level) override;
|
||||
ILevelInfo* GetLevelInfo([[maybe_unused]] const char* levelName) override;
|
||||
|
||||
private:
|
||||
void OnRootSpawnableAssigned(AZ::Data::Asset<AzFramework::Spawnable> rootSpawnable, uint32_t generation) override;
|
||||
void OnRootSpawnableReleased(uint32_t generation) override;
|
||||
|
||||
void PrepareNextLevel(const char* levelName);
|
||||
bool LoadLevelInternal(const char* levelName);
|
||||
|
||||
// Methods to notify ILevelSystemListener
|
||||
void OnPrepareNextLevel(const char* levelName);
|
||||
void OnLevelNotFound(const char* levelName);
|
||||
void OnLoadingStart(const char* levelName);
|
||||
void OnLoadingComplete(const char* levelName);
|
||||
void OnLoadingError(const char* levelName, const char* error);
|
||||
void OnLoadingProgress(const char* levelName, int progressAmount);
|
||||
void OnUnloadComplete(const char* levelName);
|
||||
|
||||
void LogLoadingTime();
|
||||
|
||||
ISystem* m_pSystem{nullptr};
|
||||
|
||||
AZStd::string m_lastLevelName;
|
||||
float m_fLastLevelLoadTime{0.0f};
|
||||
float m_fLastTime{0.0f};
|
||||
|
||||
bool m_bLevelLoaded{false};
|
||||
bool m_levelLoadFailed{false};
|
||||
|
||||
int m_nLoadedLevelsCount{0};
|
||||
|
||||
CTimeValue m_levelLoadStartTime;
|
||||
|
||||
AZStd::vector<ILevelSystemListener*> m_listeners;
|
||||
|
||||
// Information about the currently-loaded root spawnable, used for tracking loads and unloads.
|
||||
uint64_t m_rootSpawnableGeneration{0};
|
||||
AZ::Data::AssetId m_rootSpawnableId{};
|
||||
};
|
||||
|
||||
} // namespace LegacyLevelSystem
|
||||
@ -0,0 +1,143 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Math/Transform.h>
|
||||
#include <AzCore/Math/TransformSerializer.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
AZ_CLASS_ALLOCATOR_IMPL(JsonTransformSerializer, AZ::SystemAllocator, 0);
|
||||
|
||||
JsonSerializationResult::Result JsonTransformSerializer::Load(
|
||||
void* outputValue, [[maybe_unused]] const Uuid& outputValueTypeId, const rapidjson::Value& inputValue,
|
||||
JsonDeserializerContext& context)
|
||||
{
|
||||
namespace JSR = JsonSerializationResult;
|
||||
|
||||
if (azrtti_typeid<AZ::Transform>() != outputValueTypeId)
|
||||
{
|
||||
return context.Report(
|
||||
JSR::Tasks::ReadField, JSR::Outcomes::Unsupported,
|
||||
"Unable to deserialize Transform from json because the outputValueTypeId isn't a Transform type.");
|
||||
}
|
||||
|
||||
AZ::Transform* transformInstance = reinterpret_cast<AZ::Transform*>(outputValue);
|
||||
AZ_Assert(transformInstance, "Output value for JsonTransformSerializer can't be null.");
|
||||
|
||||
JSR::ResultCode result(JSR::Tasks::ReadField);
|
||||
|
||||
{
|
||||
AZ::Vector3 translation = transformInstance->GetTranslation();
|
||||
|
||||
JSR::ResultCode loadResult = ContinueLoadingFromJsonObjectField(
|
||||
&translation, azrtti_typeid<decltype(translation)>(), inputValue, TranslationTag, context);
|
||||
|
||||
result.Combine(loadResult);
|
||||
|
||||
transformInstance->SetTranslation(translation);
|
||||
}
|
||||
|
||||
{
|
||||
AZ::Quaternion rotation = transformInstance->GetRotation();
|
||||
|
||||
JSR::ResultCode loadResult =
|
||||
ContinueLoadingFromJsonObjectField(&rotation, azrtti_typeid<decltype(rotation)>(), inputValue, RotationTag, context);
|
||||
|
||||
result.Combine(loadResult);
|
||||
|
||||
transformInstance->SetRotation(rotation);
|
||||
}
|
||||
|
||||
{
|
||||
// Scale is transitioning to a single uniform scale value, but since it's still internally represented as a Vector3,
|
||||
// we need to pick one number to use for load/store operations.
|
||||
float scale = transformInstance->GetScale().GetMaxElement();
|
||||
|
||||
JSR::ResultCode loadResult =
|
||||
ContinueLoadingFromJsonObjectField(&scale, azrtti_typeid<decltype(scale)>(), inputValue, ScaleTag, context);
|
||||
|
||||
result.Combine(loadResult);
|
||||
|
||||
transformInstance->SetScale(AZ::Vector3(scale));
|
||||
}
|
||||
|
||||
return context.Report(
|
||||
result,
|
||||
result.GetProcessing() != JSR::Processing::Halted ? "Succesfully loaded Transform information."
|
||||
: "Failed to load Transform information.");
|
||||
}
|
||||
|
||||
JsonSerializationResult::Result JsonTransformSerializer::Store(
|
||||
rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, [[maybe_unused]] const Uuid& valueTypeId,
|
||||
JsonSerializerContext& context)
|
||||
{
|
||||
namespace JSR = AZ::JsonSerializationResult;
|
||||
|
||||
if (azrtti_typeid<AZ::Transform>() != valueTypeId)
|
||||
{
|
||||
return context.Report(
|
||||
JSR::Tasks::WriteValue, JSR::Outcomes::Unsupported,
|
||||
"Unable to Serialize Transform to json because the valueTypeId isn't a Transform type.");
|
||||
}
|
||||
|
||||
const AZ::Transform* transformInstance = reinterpret_cast<const AZ::Transform*>(inputValue);
|
||||
AZ_Assert(transformInstance, "Input value for JsonTransformSerializer can't be null.");
|
||||
const AZ::Transform* defaultTransformInstance = reinterpret_cast<const AZ::Transform*>(defaultValue);
|
||||
|
||||
JSR::ResultCode result(JSR::Tasks::WriteValue);
|
||||
|
||||
{
|
||||
AZ::ScopedContextPath subPathName(context, TranslationTag);
|
||||
const AZ::Vector3 translation = transformInstance->GetTranslation();
|
||||
const AZ::Vector3 defaultTranslation = defaultTransformInstance ? defaultTransformInstance->GetTranslation() : AZ::Vector3();
|
||||
|
||||
JSR::ResultCode storeResult = ContinueStoringToJsonObjectField(
|
||||
outputValue, TranslationTag, &translation, defaultTransformInstance ? &defaultTranslation : nullptr,
|
||||
azrtti_typeid<decltype(translation)>(), context);
|
||||
|
||||
result.Combine(storeResult);
|
||||
}
|
||||
|
||||
{
|
||||
AZ::ScopedContextPath subPathName(context, RotationTag);
|
||||
const AZ::Quaternion rotation = transformInstance->GetRotation();
|
||||
const AZ::Quaternion defaultRotation = defaultTransformInstance ? defaultTransformInstance->GetRotation() : AZ::Quaternion();
|
||||
|
||||
JSR::ResultCode storeResult = ContinueStoringToJsonObjectField(
|
||||
outputValue, RotationTag, &rotation, defaultTransformInstance ? &defaultRotation : nullptr,
|
||||
azrtti_typeid<decltype(rotation)>(), context);
|
||||
|
||||
result.Combine(storeResult);
|
||||
}
|
||||
|
||||
{
|
||||
AZ::ScopedContextPath subPathName(context, ScaleTag);
|
||||
|
||||
// Scale is transitioning to a single uniform scale value, but since it's still internally represented as a Vector3,
|
||||
// we need to pick one number to use for load/store operations.
|
||||
float scale = transformInstance->GetScale().GetMaxElement();
|
||||
float defaultScale = defaultTransformInstance ? defaultTransformInstance->GetScale().GetMaxElement() : 0.0f;
|
||||
|
||||
JSR::ResultCode storeResult = ContinueStoringToJsonObjectField(
|
||||
outputValue, ScaleTag, &scale, defaultTransformInstance ? &defaultScale : nullptr, azrtti_typeid<decltype(scale)>(),
|
||||
context);
|
||||
|
||||
result.Combine(storeResult);
|
||||
}
|
||||
|
||||
return context.Report(
|
||||
result,
|
||||
result.GetProcessing() != JSR::Processing::Halted ? "Successfully stored Transform information."
|
||||
: "Failed to store Transform information.");
|
||||
}
|
||||
|
||||
} // namespace AZ
|
||||
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Serialization/Json/BaseJsonSerializer.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
class JsonTransformSerializer : public BaseJsonSerializer
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(JsonTransformSerializer, "{51C321B8-9214-4E85-AA5C-B720428A3B17}", BaseJsonSerializer);
|
||||
AZ_CLASS_ALLOCATOR_DECL;
|
||||
|
||||
JsonSerializationResult::Result Load(
|
||||
void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue,
|
||||
JsonDeserializerContext& context) override;
|
||||
|
||||
JsonSerializationResult::Result Store(
|
||||
rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, const Uuid& valueTypeId,
|
||||
JsonSerializerContext& context) override;
|
||||
|
||||
private:
|
||||
// Note: These need to be defined as "const char[]" instead of "const char*" so that they can be implicitly converted
|
||||
// to a rapidjson::GenericStringRef<>. (This also lets rapidjson get the string length at compile time)
|
||||
static inline constexpr const char TranslationTag[] = "Translation";
|
||||
static inline constexpr const char RotationTag[] = "Rotation";
|
||||
static inline constexpr const char ScaleTag[] = "Scale";
|
||||
};
|
||||
|
||||
} // namespace AZ
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue