Merge branch 'main' into mp_serialize_vector
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d49aceca5ad4e0b9f46c8127afb5c53b68aa30272950b1abd66fba310977ff0c
|
||||
size 15032
|
||||
@@ -1,6 +0,0 @@
|
||||
<download name="blank2" type="Map">
|
||||
<index src="filelist.xml" dest="filelist.xml"/>
|
||||
<files>
|
||||
<file src="level.pak" dest="level.pak" size="39815" md5="3874c8411da272b96974e24a9fff06e8"/>
|
||||
</files>
|
||||
</download>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5f221acd847ec8a15e1333a5163d6d0fd886b8eda46fa7b133f76ddbf1d11216
|
||||
size 41472
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8e5dcfbe65fd2fd8ea29a38a96e703683c544fd42b9424857b1df3718c7775a
|
||||
size 41472
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0378911c27933302042550d5a031a5f9104296162edc2b21e44893f1b8cff969
|
||||
size 44124
|
||||
@@ -1,14 +0,0 @@
|
||||
<Environment>
|
||||
<Fog ViewDistance="8000" ViewDistanceLowSpec="1000" LDRGlobalDensMult="1.0"/>
|
||||
<Terrain DetailLayersViewDistRatio="1.0" HeightMapAO="0"/>
|
||||
<EnvState WindVector="1,0,0" BreezeGeneration="0" BreezeStrength="1.f" BreezeMovementSpeed="8.f" BreezeVariation="1.f" BreezeLifeTime="15.f" BreezeCount="4" BreezeSpawnRadius="25.f" BreezeSpread="0.f" BreezeRadius="5.f" ConsoleMergedMeshesPool="2750" ShowTerrainSurface="1" SunShadowsMinSpec="1" SunShadowsAdditionalCascadeMinSpec="0" SunShadowsClipPlaneRange="256.0f" SunShadowsClipPlaneRangeShift="0.0f" UseLayersActivation="0" SunLinkedToTOD="1"/>
|
||||
<VolFogShadows Enable="0" EnableForClouds="0"/>
|
||||
<CloudShadows CloudShadowTexture="" CloudShadowSpeed="0,0,0" CloudShadowTiling="1.0" CloudShadowBrightness="1.0" CloudShadowInvert="0"/>
|
||||
<ParticleLighting AmbientMul="1.0" LightsMul="1.0"/>
|
||||
<SkyBox Material="EngineAssets/Materials/Sky/Sky" MaterialLowSpec="EngineAssets/Materials/Sky/Sky" Angle="0" Stretching="0.5"/>
|
||||
<Ocean Material="EngineAssets/Materials/Water/Ocean_default" CausticsDistanceAtten="100.0" CausticDepth="8.0" CausticIntensity="1.0" CausticsTilling="1.0"/>
|
||||
<OceanAnimation WindDirection="1.0" WindSpeed="4.0" WavesAmount="1.5" WavesSize="0.4" WavesSpeed="1.0"/>
|
||||
<Moon Latitude="240.0" Longitude="45.0" Size="0.5" Texture="Textures/Skys/Night/half_moon.dds"/>
|
||||
<DynTexSource Width="256" Height="256"/>
|
||||
<Total_Illumination_v2 Active="0" IntegrationMode="0" InjectionMultiplier="1.0" SkyColorMultiplier="1.0" UseTODSkyColor="0.5" PortalsDeform="0" PortalsInject="0" DiffuseAmplifier="1.0" SpecularAmplifier="0" NumberOfBounces="1" Saturation="0.8" PropagationBooster="1.5" DiffuseBias="0.05" DiffuseConeWidth="24" ConeMaxLength="12.0" UpdateLighting="0" UpdateGeometry="0" MinNodeSize="8.0" SkipNonGILights="0" LowSpecMode="0" HalfresKernel="0" UseLightProbes="0" VoxelizaionLODRatio="1.8" VoxelPoolResolution="128" SSAOAmount="0.7" ObjectsMaxViewDistance="64" SunRSMInject="0" SSDepthTrace="0"/>
|
||||
</Environment>
|
||||
@@ -1,7 +0,0 @@
|
||||
<TerrainTexture TileCountX="1" TileCountY="1" TileResolution="512">
|
||||
<RGBLayer>
|
||||
<Tiles>
|
||||
<tile />
|
||||
</Tiles>
|
||||
</RGBLayer>
|
||||
</TerrainTexture>
|
||||
@@ -1,356 +0,0 @@
|
||||
<TimeOfDay Time="12" TimeStart="12" TimeEnd="12" TimeAnimSpeed="0">
|
||||
<Variable Name="Sun color" Color="0.94730699,0.74540401,0.57758099">
|
||||
<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.5:(0.947307:0.745404:0.577581):262180,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>
|
||||
<Variable Name="Sun intensity" Value="120000">
|
||||
<Spline Keys="0:1000:36,0.229167:1000:36,0.5:120000:36,0.770833:1000:65572,0.999306: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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color" Color="0.27049801,0.47353199,0.83077002">
|
||||
<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>
|
||||
<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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</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>
|
||||
<Variable Name="Fog color (top) multiplier" Value="1">
|
||||
<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>
|
||||
<Variable Name="Fog height (top)" Value="100">
|
||||
<Spline Keys="0:100:36,0.25:100:36,0.5:100:36,0.75:100:65572,1: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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (radial)" Color="0.76815099,0.51491803,0.16826899">
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp start" Value="25">
|
||||
<Spline Keys="0:25:36,0.25:25:36,0.5:25:65572,0.75:25:36,1:25:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp end" Value="1000">
|
||||
<Spline Keys="0:1000:36,0.25:1000:36,0.5:1000:65572,0.75:1000:36,1:1000:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp influence" Value="0.69999999">
|
||||
<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>
|
||||
<Variable Name="Volumetric fog: Shadow darkening" Value="0.2">
|
||||
<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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow range" Value="0.1">
|
||||
<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>
|
||||
<Variable Name="Volumetric fog 2: Fog height (bottom)" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog layer density (bottom)" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog height (top)" Value="4000">
|
||||
<Spline Keys="0:4000:0,1: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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Global fog density" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:0,1:0.1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Ramp start" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Ramp end" Value="0">
|
||||
<Spline Keys="0:0:0,1: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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (atmosphere)" Value="0.60000002">
|
||||
<Spline Keys="0:0.6:0,1: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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (sun radial)" Value="0.94999993">
|
||||
<Spline Keys="0:0.95:0,1:0.95:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Blend factor for sun scattering" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Blend mode for sun scattering" Value="0">
|
||||
<Spline Keys="0:0:0,1: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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (entities)" Value="0.60000002">
|
||||
<Spline Keys="0:0.6:0,1:0.6:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Maximum range of ray-marching" Value="64">
|
||||
<Spline Keys="0:64:0,1:64:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: In-scattering factor" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Extinction factor" Value="0.30000001">
|
||||
<Spline Keys="0:0.3:0,1: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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Final density clamp" Value="1">
|
||||
<Spline Keys="0:1:0,0.5:1:36,1: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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Sun intensity multiplier" Value="200">
|
||||
<Spline Keys="0:200:36,0.25:200:36,0.5:200:36,0.75:200:36,1:200:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Mie scattering" Value="2">
|
||||
<Spline Keys="0:40:36,0.5:2:36,1:40:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Rayleigh scattering" Value="0.2">
|
||||
<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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Wavelength (G)" Value="597">
|
||||
<Spline Keys="0:597:36,0.25:597:36,0.5:597:36,0.75:597:36,1: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,"/>
|
||||
</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>
|
||||
<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>
|
||||
<Variable Name="Night sky: Zenith color" Color="0.361307,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>
|
||||
<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>
|
||||
<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,"/>
|
||||
</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>
|
||||
<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,"/>
|
||||
</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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<Variable Name="Night sky: Moon outer corona color" Color="0.201556,0.22696599,0.254152">
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun custom color" Color="0.83077002,0.76815099,0.65837502">
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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,"/>
|
||||
</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>
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays custom color" Color="0.66538697,0.838799,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>
|
||||
<Variable Name="Ocean fog color" Color="0.0012141099,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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Skybox multiplier" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve shoulder scale" Value="2">
|
||||
<Spline Keys="0:3:36,0.229167:3:36,0.5:2:36,0.770833:3:36,1:3:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve midtones scale" Value="1">
|
||||
<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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Scene key" Value="0.18000001">
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Max exposure" Value="2.8">
|
||||
<Spline Keys="0:2:36,0.229167:2:36,0.5:2.8:36,0.770833:2:36,1:2:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Min" Value="4.5">
|
||||
<Spline Keys="0:4.5:0,1:4.5:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Max" Value="17">
|
||||
<Spline Keys="0:17:0,1:17:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Auto compensation" Value="1.5">
|
||||
<Spline Keys="0:1.5:0,1:1.5:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Bloom amount" Value="0.1">
|
||||
<Spline Keys="0:1:36,0.229167:1:36,0.5:0.1:36,0.770833:1:36,1: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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Dof: focus range" Value="500">
|
||||
<Spline Keys="0:500:36,0.25:500:36,0.5:500:65572,0.75:500:36,1:500:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Dof: blur amount" Value="0.1">
|
||||
<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>
|
||||
<Variable Name="Cascade 0: Bias" Value="0.1">
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 1: Bias" Value="0.1">
|
||||
<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>
|
||||
<Variable Name="Cascade 1: Slope Bias" Value="8">
|
||||
<Spline Keys="0:8:36,0.25:8:36,0.5:8:65572,0.75:8:36,1:8:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 2: Bias" Value="0.1">
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 3: Bias" Value="0.1">
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 4: Bias" Value="0.1">
|
||||
<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>
|
||||
<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,"/>
|
||||
</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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 6: Bias" Value="0.1">
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 7: Bias" Value="0.1">
|
||||
<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>
|
||||
<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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Shadow jittering" Value="2.5">
|
||||
<Spline Keys="0:5:36,0.25:2.5:36,0.5:2.5:65572,0.75:2.5:36,1:5:0,"/>
|
||||
</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,"/>
|
||||
</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,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun color multiplier" Value="10">
|
||||
<Spline Keys="0:0.1:36,0.25:10:36,0.5:10:36,0.75:10:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
</TimeOfDay>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e6a5435c928079b27796f6b202bbc2623e7e454244ddc099a3cadf33b7cb9e9
|
||||
size 63
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:12ca8f1942331abde4d58724aea22609c8d7951cc415afa6e5f1c550a14e67b0
|
||||
size 363624
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f5b525a410730d84c0b3e97396d392e1e72f4b894742ddef3de4ede5542b0f8e
|
||||
size 86148
|
||||
@@ -1,12 +0,0 @@
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85
|
||||
size 22
|
||||
@@ -1,7 +0,0 @@
|
||||
<Material MtlFlags="2623488" Shader="Watervolume" GenMask="80000013" StringGenMask="" SurfaceType="mat_water" Diffuse="1,1,1,1" Specular="0.27583286,0.27583286,0.27583286,1" Opacity="1" Shininess="255" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Specular" File="engineassets/textures/water_gloss.dds" Filter="7"/>
|
||||
<Texture Map="Environment" File="nearest_cubemap" TexType="7"/>
|
||||
</Textures>
|
||||
<PublicParams NormalsScale="0.5" GlossMapTilling="1" SoftIntersectionFactor="1" Tilling="0.1" DetailNormalsScale="0.5" GlossMapBias="0" EnvCubeReflMul="16" VertexWaveScale="0.125" DetailTilling="2.5" EnvCubeScale="16" GlossMapScale="1.5" RealtimeReflMul="1" RainTilling="1" WaterFlowSpeed="0.5"/>
|
||||
</Material>
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <IRenderer.h>
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
@@ -84,7 +83,7 @@ public: // types
|
||||
//! If this is not passed then the defaults below are used
|
||||
struct TextOptions
|
||||
{
|
||||
IFFont* font; //!< default is "default"
|
||||
AZStd::string fontName; //!< default is "default"
|
||||
unsigned int effectIndex; //!< default is 0
|
||||
AZ::Vector3 color; //!< default is (1,1,1)
|
||||
HAlign horizontalAlignment; //!< default is HAlign::Left
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
#include <AzCore/Math/Matrix3x4.h>
|
||||
#include <AzCore/std/string/string_view.h>
|
||||
#include <AzFramework/Viewport/ViewportId.h>
|
||||
|
||||
@@ -42,11 +43,15 @@ namespace AzFramework
|
||||
{
|
||||
ViewportId m_drawViewportId = InvalidViewportId; //!< Viewport to draw into
|
||||
AZ::Vector3 m_position; //!< world space position for 3d draws, screen space x,y,depth for 2d.
|
||||
AZ::Color m_color = AZ::Colors::White; //!< Color to draw the text
|
||||
AZ::Color m_color = AZ::Colors::White; //!< Color to draw the text
|
||||
unsigned int m_effectIndex = 0; //!< effect index to apply
|
||||
AZ::Vector2 m_scale = AZ::Vector2(1.0f); //!< font scale
|
||||
float m_lineSpacing; //!< Spacing between new lines, as a percentage of m_scale.
|
||||
float m_textSizeFactor = 12.0f; //!< font size in pixels
|
||||
float m_lineSpacing = 1.0f; //!< Spacing between new lines, as a percentage of m_scale.
|
||||
TextHorizontalAlignment m_hAlign = TextHorizontalAlignment::Left; //!< Horizontal text alignment
|
||||
TextVerticalAlignment m_vAlign = TextVerticalAlignment::Top; //!< Vertical text alignment
|
||||
bool m_useTransform = false; //!< Use specified transform
|
||||
AZ::Matrix3x4 m_transform = AZ::Matrix3x4::Identity(); //!< Transform to apply to text quads
|
||||
bool m_monospace = false; //!< disable character proportional spacing
|
||||
bool m_depthTest = false; //!< Test character against the depth buffer
|
||||
bool m_virtual800x600ScreenSize = true; //!< Text placement and size are scaled relative to a virtual 800x600 resolution
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
|
||||
#include <Atom/RHI.Reflect/InputStreamLayoutBuilder.h>
|
||||
|
||||
static const AZ::Vector2 UiDraw_TextSizeFactor = AZ::Vector2(12.0f, 12.0f);
|
||||
static const int TabCharCount = 4;
|
||||
// set buffer sizes to hold max characters that can be drawn in 1 DrawString call
|
||||
static const size_t MaxVerts = 8 * 1024; // 2048 quads
|
||||
@@ -1673,6 +1672,12 @@ static void SetCommonContextFlags(AZ::TextDrawContext& ctx, const AzFramework::T
|
||||
{
|
||||
ctx.m_drawTextFlags |= eDrawText_FixedSize;
|
||||
}
|
||||
|
||||
if (params.m_useTransform)
|
||||
{
|
||||
ctx.m_drawTextFlags |= eDrawText_UseTransform;
|
||||
ctx.SetTransform(AZMatrix3x4ToLYMatrix3x4(params.m_transform));
|
||||
}
|
||||
}
|
||||
|
||||
AZ::FFont::DrawParameters AZ::FFont::ExtractDrawParameters(const AzFramework::TextDrawParameters& params, AZStd::string_view text, bool forceCalculateSize)
|
||||
@@ -1696,22 +1701,25 @@ AZ::FFont::DrawParameters AZ::FFont::ExtractDrawParameters(const AzFramework::Te
|
||||
}
|
||||
internalParams.m_ctx.SetBaseState(GS_NODEPTHTEST);
|
||||
internalParams.m_ctx.SetColor(AZColorToLYColorF(params.m_color));
|
||||
internalParams.m_ctx.SetEffect(params.m_effectIndex);
|
||||
internalParams.m_ctx.SetCharWidthScale((params.m_monospace || params.m_scaleWithWindow) ? 0.5f : 1.0f);
|
||||
internalParams.m_ctx.EnableFrame(false);
|
||||
internalParams.m_ctx.SetProportional(!params.m_monospace && params.m_scaleWithWindow);
|
||||
internalParams.m_ctx.SetSizeIn800x600(params.m_scaleWithWindow && params.m_virtual800x600ScreenSize);
|
||||
internalParams.m_ctx.SetSize(AZVec2ToLYVec2(UiDraw_TextSizeFactor * params.m_scale));
|
||||
internalParams.m_ctx.SetSize(AZVec2ToLYVec2(AZ::Vector2(params.m_textSizeFactor, params.m_textSizeFactor) * params.m_scale));
|
||||
internalParams.m_ctx.SetLineSpacing(params.m_lineSpacing);
|
||||
if (params.m_monospace || !params.m_scaleWithWindow)
|
||||
{
|
||||
ScaleCoord(viewport, posX, posY);
|
||||
}
|
||||
|
||||
if (params.m_hAlign != AzFramework::TextHorizontalAlignment::Left ||
|
||||
params.m_vAlign != AzFramework::TextVerticalAlignment::Top ||
|
||||
forceCalculateSize)
|
||||
{
|
||||
// We align based on the size of the default font effect because we do not want the
|
||||
// text to move when the font effect is changed
|
||||
unsigned int effectIndex = internalParams.m_ctx.m_fxIdx;
|
||||
internalParams.m_ctx.SetEffect(0);
|
||||
Vec2 textSize = GetTextSizeUInternal(viewport, text.data(), params.m_multiline, internalParams.m_ctx);
|
||||
internalParams.m_ctx.SetEffect(effectIndex);
|
||||
|
||||
// If we're using virtual 800x600 coordinates, convert the text size from
|
||||
// pixels to that before using it as an offset.
|
||||
if (internalParams.m_ctx.m_sizeIn800x600)
|
||||
|
||||
+19
-22
@@ -32,32 +32,29 @@ namespace AZ
|
||||
|
||||
void ReleaseResourcesStep::Start()
|
||||
{
|
||||
m_context->GetData()->m_defaultMaterialAsset.Release();
|
||||
m_context->GetData()->m_defaultModelAsset.Release();
|
||||
m_context->GetData()->m_materialAsset.Release();
|
||||
m_context->GetData()->m_modelAsset.Release();
|
||||
auto data = m_context->GetData();
|
||||
|
||||
data->m_defaultMaterialAsset.Release();
|
||||
data->m_defaultModelAsset.Release();
|
||||
data->m_materialAsset.Release();
|
||||
data->m_modelAsset.Release();
|
||||
data->m_lightingPresetAsset.Release();
|
||||
|
||||
if (m_context->GetData()->m_modelEntity)
|
||||
if (data->m_modelEntity)
|
||||
{
|
||||
AzFramework::EntityContextRequestBus::Event(m_context->GetData()->m_entityContext->GetContextId(),
|
||||
&AzFramework::EntityContextRequestBus::Events::DestroyEntity, m_context->GetData()->m_modelEntity);
|
||||
m_context->GetData()->m_modelEntity = nullptr;
|
||||
AzFramework::EntityContextRequestBus::Event(data->m_entityContext->GetContextId(),
|
||||
&AzFramework::EntityContextRequestBus::Events::DestroyEntity, data->m_modelEntity);
|
||||
data->m_modelEntity = nullptr;
|
||||
}
|
||||
|
||||
m_context->GetData()->m_frameworkScene->UnsetSubsystem<RPI::Scene>();
|
||||
|
||||
m_context->GetData()->m_scene->Deactivate();
|
||||
m_context->GetData()->m_scene->RemoveRenderPipeline(m_context->GetData()->m_renderPipeline->GetId());
|
||||
RPI::RPISystemInterface::Get()->UnregisterScene(m_context->GetData()->m_scene);
|
||||
|
||||
auto sceneSystem = AzFramework::SceneSystemInterface::Get();
|
||||
AZ_Assert(sceneSystem, "Thumbnail system failed to get scene system implementation.");
|
||||
[[maybe_unused]] bool sceneRemovedSuccessfully = sceneSystem->RemoveScene(m_context->GetData()->m_sceneName);
|
||||
AZ_Assert(
|
||||
sceneRemovedSuccessfully, "Thumbnail system was unable to remove scene '%s' from the scene system.",
|
||||
m_context->GetData()->m_sceneName.c_str());
|
||||
m_context->GetData()->m_scene = nullptr;
|
||||
m_context->GetData()->m_renderPipeline = nullptr;
|
||||
data->m_scene->Deactivate();
|
||||
data->m_scene->RemoveRenderPipeline(data->m_renderPipeline->GetId());
|
||||
RPI::RPISystemInterface::Get()->UnregisterScene(data->m_scene);
|
||||
data->m_frameworkScene->UnsetSubsystem(data->m_scene);
|
||||
data->m_frameworkScene->UnsetSubsystem(data->m_entityContext.get());
|
||||
data->m_scene = nullptr;
|
||||
data->m_frameworkScene = nullptr;
|
||||
data->m_renderPipeline = nullptr;
|
||||
}
|
||||
} // namespace Thumbnails
|
||||
} // namespace LyIntegration
|
||||
|
||||
@@ -30,6 +30,11 @@ namespace ViewportHelpers
|
||||
return isControlledByParent;
|
||||
}
|
||||
|
||||
float GetDpiScaledSize(float size)
|
||||
{
|
||||
return size * ViewportIcon::GetDpiScaleFactor();
|
||||
}
|
||||
|
||||
bool IsHorizontallyFit(const AZ::Entity* element)
|
||||
{
|
||||
bool isHorizontallyFit = false;
|
||||
@@ -332,11 +337,12 @@ namespace ViewportHelpers
|
||||
|
||||
AZ::Vector2 pivotPos;
|
||||
EBUS_EVENT_ID_RESULT(pivotPos, element->GetId(), UiTransformBus, GetViewportSpacePivot);
|
||||
AZ::Vector2 rotationStringPos(pivotPos.GetX(), pivotPos.GetY() - ((viewportPivot->GetSize().GetY() * 0.5f) + 4.0f));
|
||||
float offset = (viewportPivot->GetSize().GetY() * 0.5f) + (GetDpiScaledSize(4.0f));
|
||||
AZ::Vector2 rotationStringPos(pivotPos.GetX(), pivotPos.GetY() - offset);
|
||||
|
||||
draw2d.SetTextAlignment(IDraw2d::HAlign::Center, IDraw2d::VAlign::Bottom);
|
||||
draw2d.SetTextRotation(0.0f);
|
||||
draw2d.DrawText(rotationString.toUtf8().data(), rotationStringPos, 16.0f, 1.0f);
|
||||
draw2d.DrawText(rotationString.toUtf8().data(), rotationStringPos, GetDpiScaledSize(16.0f), 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,6 +356,6 @@ namespace ViewportHelpers
|
||||
|
||||
draw2d.SetTextAlignment(IDraw2d::HAlign::Left, IDraw2d::VAlign::Bottom);
|
||||
draw2d.SetTextRotation(0.0f);
|
||||
draw2d.DrawText(textLabel.c_str(), textPos, 16.0f, 1.0f);
|
||||
draw2d.DrawText(textLabel.c_str(), textPos, GetDpiScaledSize(16.0f), 1.0f);
|
||||
}
|
||||
} // namespace ViewportHelpers
|
||||
|
||||
@@ -303,7 +303,7 @@ void ViewportIcon::DrawDistanceLine(Draw2dHelper& draw2d, AZ::Vector2 start, AZ:
|
||||
|
||||
draw2d.SetTextAlignment(IDraw2d::HAlign::Center, IDraw2d::VAlign::Bottom);
|
||||
draw2d.SetTextRotation(rotation);
|
||||
draw2d.DrawText(textBuf, textPos, 16.0f, 1.0f);
|
||||
draw2d.DrawText(textBuf, textPos, 16.0f * ViewportIcon::GetDpiScaleFactor(), 1.0f);
|
||||
}
|
||||
|
||||
void ViewportIcon::DrawAnchorLinesSplit(Draw2dHelper& draw2d, AZ::Vector2 anchorPos1, AZ::Vector2 anchorPos2,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <LyShine/ILyShine.h>
|
||||
#include <LyShine/Bus/UiTransformBus.h>
|
||||
|
||||
#include <AzFramework/Font/FontInterface.h>
|
||||
#include <Atom/Bootstrap/BootstrapNotificationBus.h>
|
||||
#include <Atom/RPI.Public/DynamicDraw/DynamicDrawInterface.h>
|
||||
#include <Atom/RPI.Reflect/Image/Image.h>
|
||||
@@ -256,9 +257,8 @@ protected: // types and constants
|
||||
const Draw2dShaderData& shaderData,
|
||||
AZ::RPI::ViewportContextPtr viewportContext) const override;
|
||||
|
||||
STextDrawContext m_fontContext;
|
||||
IFFont* m_font;
|
||||
AZ::Vector2 m_position;
|
||||
AzFramework::TextDrawParameters m_drawParameters;
|
||||
AzFramework::FontId m_fontId;
|
||||
std::string m_string;
|
||||
};
|
||||
|
||||
@@ -288,7 +288,7 @@ protected: // member functions
|
||||
void RotatePointsAboutPivot(AZ::Vector2* points, int numPoints, AZ::Vector2 pivot, float angle) const;
|
||||
|
||||
//! Helper function to render a text string
|
||||
void DrawTextInternal(const char* textString, IFFont* font, unsigned int effectIndex,
|
||||
void DrawTextInternal(const char* textString, AzFramework::FontId fontId, unsigned int effectIndex,
|
||||
AZ::Vector2 position, float pointSize, AZ::Color color, float rotation,
|
||||
HAlign horizontalAlignment, VAlign verticalAlignment, int baseState);
|
||||
|
||||
@@ -298,6 +298,9 @@ protected: // member functions
|
||||
//! Draw or defer a line
|
||||
void DrawOrDeferLine(const DeferredLine* line);
|
||||
|
||||
//! Draw or defer a text string
|
||||
void DrawOrDeferTextString(const DeferredText* text);
|
||||
|
||||
//! Draw or defer a rect outline
|
||||
void DrawOrDeferRectOutline(const DeferredRectOutline* outlineRect);
|
||||
|
||||
@@ -491,7 +494,7 @@ public: // member functions
|
||||
void SetImageBaseState(int state) { m_imageOptions.baseState = state; }
|
||||
|
||||
//! Set the text font.
|
||||
void SetTextFont(IFFont* font) { m_textOptions.font = font; }
|
||||
void SetTextFont(AZStd::string_view fontName) { m_textOptions.fontName = fontName; }
|
||||
|
||||
//! Set the text font effect index.
|
||||
void SetTextEffectIndex(unsigned int effectIndex) { m_textOptions.effectIndex = effectIndex; }
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
*/
|
||||
#include "LyShine_precompiled.h"
|
||||
#include "IFont.h"
|
||||
#include <IRenderer.h> // for SVF_P3F_C4B_T2F which will be removed in a coming PR
|
||||
|
||||
#include <LyShine/Draw2d.h>
|
||||
|
||||
#include <AzCore/Math/Matrix3x3.h>
|
||||
#include <AzCore/Math/MatrixUtils.h>
|
||||
#include <AzFramework/Font/FontInterface.h>
|
||||
|
||||
#include <Atom/RPI.Public/Image/ImageSystemInterface.h>
|
||||
#include <Atom/RPI.Public/RPISystemInterface.h>
|
||||
@@ -55,7 +57,7 @@ CDraw2d::CDraw2d(AZ::RPI::ViewportContextPtr viewportContext)
|
||||
m_defaultImageOptions.pixelRounding = Rounding::Nearest;
|
||||
m_defaultImageOptions.baseState = g_defaultBaseState;
|
||||
|
||||
m_defaultTextOptions.font = (gEnv && gEnv->pCryFont != nullptr) ? gEnv->pCryFont->GetFont("default") : nullptr;
|
||||
m_defaultTextOptions.fontName = "default";
|
||||
m_defaultTextOptions.effectIndex = 0;
|
||||
m_defaultTextOptions.color.Set(1.0f, 1.0f, 1.0f);
|
||||
m_defaultTextOptions.horizontalAlignment = HAlign::Left;
|
||||
@@ -283,13 +285,20 @@ void CDraw2d::DrawText(const char* textString, AZ::Vector2 position, float point
|
||||
{
|
||||
TextOptions* actualTextOptions = (textOptions) ? textOptions : &m_defaultTextOptions;
|
||||
|
||||
AzFramework::FontId fontId = AzFramework::InvalidFontId;
|
||||
AzFramework::FontQueryInterface* fontQueryInterface = AZ::Interface<AzFramework::FontQueryInterface>::Get();
|
||||
if (fontQueryInterface)
|
||||
{
|
||||
fontId = fontQueryInterface->GetFontId(actualTextOptions->fontName);
|
||||
}
|
||||
|
||||
// render the drop shadow, if needed
|
||||
if ((actualTextOptions->dropShadowColor.GetA() > 0.0f) &&
|
||||
(actualTextOptions->dropShadowOffset.GetX() || actualTextOptions->dropShadowOffset.GetY()))
|
||||
{
|
||||
// calculate the drop shadow pos and render it
|
||||
AZ::Vector2 dropShadowPosition(position + actualTextOptions->dropShadowOffset);
|
||||
DrawTextInternal(textString, actualTextOptions->font, actualTextOptions->effectIndex,
|
||||
DrawTextInternal(textString, fontId, actualTextOptions->effectIndex,
|
||||
dropShadowPosition, pointSize, actualTextOptions->dropShadowColor,
|
||||
actualTextOptions->rotation,
|
||||
actualTextOptions->horizontalAlignment, actualTextOptions->verticalAlignment,
|
||||
@@ -298,7 +307,7 @@ void CDraw2d::DrawText(const char* textString, AZ::Vector2 position, float point
|
||||
|
||||
// draw the text string
|
||||
AZ::Color textColor = AZ::Color::CreateFromVector3AndFloat(actualTextOptions->color, opacity);
|
||||
DrawTextInternal(textString, actualTextOptions->font, actualTextOptions->effectIndex,
|
||||
DrawTextInternal(textString, fontId, actualTextOptions->effectIndex,
|
||||
position, pointSize, textColor,
|
||||
actualTextOptions->rotation,
|
||||
actualTextOptions->horizontalAlignment, actualTextOptions->verticalAlignment,
|
||||
@@ -398,20 +407,35 @@ void CDraw2d::DrawRectOutlineTextured(AZ::Data::Instance<AZ::RPI::Image> image,
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
AZ::Vector2 CDraw2d::GetTextSize(const char* textString, float pointSize, TextOptions* textOptions)
|
||||
{
|
||||
TextOptions* actualTextOptions = (textOptions) ? textOptions : &m_defaultTextOptions;
|
||||
|
||||
if (!actualTextOptions->font)
|
||||
AzFramework::FontDrawInterface* fontDrawInterface = nullptr;
|
||||
AzFramework::FontQueryInterface* fontQueryInterface = AZ::Interface<AzFramework::FontQueryInterface>::Get();
|
||||
if (fontQueryInterface)
|
||||
{
|
||||
TextOptions* actualTextOptions = (textOptions) ? textOptions : &m_defaultTextOptions;
|
||||
AzFramework::FontId fontId = fontQueryInterface->GetFontId(actualTextOptions->fontName);
|
||||
fontDrawInterface = fontQueryInterface->GetFontDrawInterface(fontId);
|
||||
}
|
||||
if (!fontDrawInterface)
|
||||
{
|
||||
return AZ::Vector2(0.0f, 0.0f);
|
||||
}
|
||||
|
||||
STextDrawContext fontContext;
|
||||
fontContext.SetEffect(actualTextOptions->effectIndex);
|
||||
fontContext.SetSizeIn800x600(false);
|
||||
fontContext.SetSize(vector2f(pointSize, pointSize));
|
||||
// Set up draw parameters
|
||||
AzFramework::TextDrawParameters drawParams;
|
||||
drawParams.m_drawViewportId = GetViewportContext()->GetId();
|
||||
drawParams.m_position = AZ::Vector3(0.0f, 0.0f, 1.0f);
|
||||
drawParams.m_effectIndex = 0;
|
||||
drawParams.m_textSizeFactor = pointSize;
|
||||
drawParams.m_scale = AZ::Vector2(1.0f, 1.0f);
|
||||
drawParams.m_lineSpacing = 1.0f;
|
||||
drawParams.m_monospace = false;
|
||||
drawParams.m_depthTest = false;
|
||||
drawParams.m_virtual800x600ScreenSize = false;
|
||||
drawParams.m_scaleWithWindow = false;
|
||||
drawParams.m_multiline = true;
|
||||
|
||||
Vec2 textSize = actualTextOptions->font->GetTextSize(textString, true, fontContext);
|
||||
return AZ::Vector2(textSize.x, textSize.y);
|
||||
AZ::Vector2 textSize = fontDrawInterface->GetTextSize(drawParams, textString);
|
||||
return textSize;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -559,100 +583,89 @@ void CDraw2d::RotatePointsAboutPivot(AZ::Vector2* points, [[maybe_unused]] int n
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void CDraw2d::DrawTextInternal(const char* textString, IFFont* font, unsigned int effectIndex,
|
||||
void CDraw2d::DrawTextInternal(const char* textString, AzFramework::FontId fontId, unsigned int effectIndex,
|
||||
AZ::Vector2 position, float pointSize, AZ::Color color, float rotation,
|
||||
HAlign horizontalAlignment, VAlign verticalAlignment, int baseState)
|
||||
HAlign horizontalAlignment, VAlign verticalAlignment, [[maybe_unused]] int baseState)
|
||||
{
|
||||
if (!font)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
STextDrawContext fontContext;
|
||||
fontContext.SetEffect(effectIndex);
|
||||
fontContext.SetSizeIn800x600(false);
|
||||
fontContext.SetSize(vector2f(pointSize, pointSize));
|
||||
fontContext.SetColor(ColorF(color.GetR(), color.GetG(), color.GetB(), color.GetA()));
|
||||
fontContext.m_baseState = baseState;
|
||||
fontContext.SetOverrideViewProjMatrices(false);
|
||||
|
||||
// FFont.cpp uses the alpha value of the color to decide whether to use the color, if the alpha value is zero
|
||||
// (in a ColorB format) then the color set via SetColor is ignored and it usually ends up drawing with an alpha of 1.
|
||||
// This is not what we want so in this case do not draw at all.
|
||||
if (!fontContext.IsColorOverridden())
|
||||
if (AZ::IsClose(color.GetA(), 0.0f))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AZ::Vector2 alignedPosition;
|
||||
if (horizontalAlignment == HAlign::Left && verticalAlignment == VAlign::Top)
|
||||
// Convert Draw2d alignment to text alignment
|
||||
AzFramework::TextHorizontalAlignment hAlignment = AzFramework::TextHorizontalAlignment::Left;
|
||||
switch (horizontalAlignment)
|
||||
{
|
||||
alignedPosition = position;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we align based on the size of the default font effect, because we do not want the
|
||||
// text to move when the font effect is changed
|
||||
unsigned int fontEffectIndex = fontContext.m_fxIdx;
|
||||
fontContext.SetEffect(0);
|
||||
Vec2 textSize = font->GetTextSize(textString, true, fontContext);
|
||||
fontContext.SetEffect(fontEffectIndex);
|
||||
|
||||
alignedPosition = Align(position, AZ::Vector2(textSize.x, textSize.y), horizontalAlignment, verticalAlignment);
|
||||
case HAlign::Left:
|
||||
hAlignment = AzFramework::TextHorizontalAlignment::Left;
|
||||
break;
|
||||
case HAlign::Center:
|
||||
hAlignment = AzFramework::TextHorizontalAlignment::Center;
|
||||
break;
|
||||
case HAlign::Right:
|
||||
hAlignment = AzFramework::TextHorizontalAlignment::Right;
|
||||
break;
|
||||
default:
|
||||
AZ_Assert(false, "Attempting to draw text with unsupported horizontal alignment.");
|
||||
break;
|
||||
}
|
||||
|
||||
int flags = 0;
|
||||
AzFramework::TextVerticalAlignment vAlignment = AzFramework::TextVerticalAlignment::Top;
|
||||
switch (verticalAlignment)
|
||||
{
|
||||
case VAlign::Top:
|
||||
vAlignment = AzFramework::TextVerticalAlignment::Top;
|
||||
break;
|
||||
case VAlign::Center:
|
||||
vAlignment = AzFramework::TextVerticalAlignment::Center;
|
||||
break;
|
||||
case VAlign::Bottom:
|
||||
vAlignment = AzFramework::TextVerticalAlignment::Bottom;
|
||||
break;
|
||||
default:
|
||||
AZ_Assert(false, "Attempting to draw text with unsupported vertical alignment.");
|
||||
break;
|
||||
}
|
||||
|
||||
// Set up draw parameters for font interface
|
||||
AzFramework::TextDrawParameters drawParams;
|
||||
drawParams.m_drawViewportId = GetViewportContext()->GetId();
|
||||
drawParams.m_position = AZ::Vector3(position.GetX(), position.GetY(), 1.0f);
|
||||
drawParams.m_color = color;
|
||||
drawParams.m_effectIndex = effectIndex;
|
||||
drawParams.m_textSizeFactor = pointSize;
|
||||
drawParams.m_scale = AZ::Vector2(1.0f, 1.0f);
|
||||
drawParams.m_lineSpacing = 1.0f; //!< Spacing between new lines, as a percentage of m_scale.
|
||||
drawParams.m_hAlign = hAlignment;
|
||||
drawParams.m_vAlign = vAlignment;
|
||||
drawParams.m_monospace = false;
|
||||
drawParams.m_depthTest = false;
|
||||
drawParams.m_virtual800x600ScreenSize = false;
|
||||
drawParams.m_scaleWithWindow = false;
|
||||
drawParams.m_multiline = true;
|
||||
|
||||
if (rotation != 0.0f)
|
||||
{
|
||||
// rotate around the position (if aligned to center will rotate about center etc)
|
||||
float rotRad = DEG2RAD(rotation);
|
||||
Vec3 pivot(position.GetX(), position.GetY(), 0.0f);
|
||||
Matrix34A moveToPivotSpaceMat = Matrix34A::CreateTranslationMat(-pivot);
|
||||
Matrix34A rotMat = Matrix34A::CreateRotationZ(rotRad);
|
||||
Matrix34A moveFromPivotSpaceMat = Matrix34A::CreateTranslationMat(pivot);
|
||||
AZ::Vector3 pivot(position.GetX(), position.GetY(), 0.0f);
|
||||
AZ::Matrix3x4 moveToPivotSpaceMat = AZ::Matrix3x4::CreateTranslation(-pivot);
|
||||
AZ::Matrix3x4 rotMat = AZ::Matrix3x4::CreateRotationZ(rotRad);
|
||||
AZ::Matrix3x4 moveFromPivotSpaceMat = AZ::Matrix3x4::CreateTranslation(pivot);
|
||||
|
||||
Matrix34A transform = moveFromPivotSpaceMat * rotMat * moveToPivotSpaceMat;
|
||||
fontContext.SetTransform(transform);
|
||||
flags |= eDrawText_UseTransform;
|
||||
drawParams.m_transform = moveFromPivotSpaceMat * rotMat * moveToPivotSpaceMat;
|
||||
drawParams.m_useTransform = true;
|
||||
}
|
||||
|
||||
// The font system uses these alignment flags to force text to be in the safe zone
|
||||
// depending on overscan etc
|
||||
if (horizontalAlignment == HAlign::Center)
|
||||
{
|
||||
flags |= eDrawText_Center;
|
||||
}
|
||||
else if (horizontalAlignment == HAlign::Right)
|
||||
{
|
||||
flags |= eDrawText_Right;
|
||||
}
|
||||
DeferredText newText;
|
||||
newText.m_drawParameters = drawParams;
|
||||
newText.m_fontId = fontId;
|
||||
newText.m_string = textString;
|
||||
|
||||
if (verticalAlignment == VAlign::Center)
|
||||
{
|
||||
flags |= eDrawText_CenterV;
|
||||
}
|
||||
else if (verticalAlignment == VAlign::Bottom)
|
||||
{
|
||||
flags |= eDrawText_Bottom;
|
||||
}
|
||||
|
||||
fontContext.SetFlags(flags);
|
||||
|
||||
if (m_deferCalls)
|
||||
{
|
||||
DeferredText* newText = new DeferredText;
|
||||
|
||||
newText->m_fontContext = fontContext;
|
||||
newText->m_font = font;
|
||||
newText->m_position = alignedPosition;
|
||||
newText->m_string = textString;
|
||||
|
||||
m_deferredPrimitives.push_back(newText);
|
||||
}
|
||||
else
|
||||
{
|
||||
font->DrawString(alignedPosition.GetX(), alignedPosition.GetY(), textString, true, fontContext);
|
||||
}
|
||||
DrawOrDeferTextString(&newText);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -685,6 +698,20 @@ void CDraw2d::DrawOrDeferLine(const DeferredLine* line)
|
||||
}
|
||||
}
|
||||
|
||||
void CDraw2d::DrawOrDeferTextString(const DeferredText* text)
|
||||
{
|
||||
if (m_deferCalls)
|
||||
{
|
||||
DeferredText* newText = new DeferredText;
|
||||
*newText = *text;
|
||||
m_deferredPrimitives.push_back(newText);
|
||||
}
|
||||
else
|
||||
{
|
||||
text->Draw(m_dynamicDraw, m_shaderData, GetViewportContext());
|
||||
}
|
||||
}
|
||||
|
||||
void CDraw2d::DrawOrDeferRectOutline(const DeferredRectOutline* rectOutline)
|
||||
{
|
||||
if (m_deferCalls)
|
||||
@@ -919,6 +946,15 @@ void CDraw2d::DeferredText::Draw([[maybe_unused]] AZ::RHI::Ptr<AZ::RPI::DynamicD
|
||||
[[maybe_unused]] const Draw2dShaderData& shaderData,
|
||||
[[maybe_unused]] AZ::RPI::ViewportContextPtr viewportContext) const
|
||||
{
|
||||
m_font->DrawString(m_position.GetX(), m_position.GetY(), m_string.c_str(), true, m_fontContext);
|
||||
AzFramework::FontDrawInterface* fontDrawInterface = nullptr;
|
||||
AzFramework::FontQueryInterface* fontQueryInterface = AZ::Interface<AzFramework::FontQueryInterface>::Get();
|
||||
if (fontQueryInterface)
|
||||
{
|
||||
fontDrawInterface = fontQueryInterface->GetFontDrawInterface(m_fontId);
|
||||
if (fontDrawInterface)
|
||||
{
|
||||
fontDrawInterface->DrawScreenAlignedText2d(m_drawParameters, m_string.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -454,7 +454,6 @@ void CLyShine::Render()
|
||||
|
||||
GetUiRenderer()->EndUiFrameRender();
|
||||
|
||||
#ifdef LYSHINE_ATOM_TODO // convert debug info to Atom
|
||||
#ifndef _RELEASE
|
||||
if (CV_ui_DisplayElemBounds)
|
||||
{
|
||||
@@ -474,7 +473,6 @@ void CLyShine::Render()
|
||||
m_uiCanvasManager->DebugDisplayDrawCallData();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "LyShine_precompiled.h"
|
||||
#include "LyShineDebug.h"
|
||||
#include "IConsole.h"
|
||||
#include "IRenderer.h"
|
||||
#include <LyShine/Draw2d.h>
|
||||
|
||||
#include <Atom/RPI.Public/Image/ImageSystemInterface.h>
|
||||
@@ -392,15 +393,15 @@ static void DebugDrawColoredBox(AZ::Vector2 pos, AZ::Vector2 size, AZ::Color col
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(_RELEASE)
|
||||
static void DebugDrawStringWithSizeBox(IFFont* font, unsigned int effectIndex, const char* sizeString,
|
||||
static void DebugDrawStringWithSizeBox(AZStd::string_view font, unsigned int effectIndex, const char* sizeString,
|
||||
const char* testString, AZ::Vector2 pos, float spacing, float size)
|
||||
{
|
||||
CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d();
|
||||
|
||||
IDraw2d::TextOptions textOptions = draw2d->GetDefaultTextOptions();
|
||||
if (font)
|
||||
if (!font.empty())
|
||||
{
|
||||
textOptions.font = font;
|
||||
textOptions.fontName = font;
|
||||
}
|
||||
textOptions.effectIndex = effectIndex;
|
||||
|
||||
@@ -427,7 +428,7 @@ static void DebugDrawStringWithSizeBox(IFFont* font, unsigned int effectIndex, c
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(_RELEASE)
|
||||
static void DebugDraw2dFontSizes(IFFont* font, unsigned int effectIndex, const char* fontName)
|
||||
static void DebugDraw2dFontSizes(AZStd::string_view font, unsigned int effectIndex)
|
||||
{
|
||||
CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d();
|
||||
|
||||
@@ -436,7 +437,7 @@ static void DebugDraw2dFontSizes(IFFont* font, unsigned int effectIndex, const c
|
||||
float xSpacing = 20.0f;
|
||||
|
||||
char buffer[32];
|
||||
sprintf_s(buffer, "Font = %s, effect = %d", fontName, effectIndex);
|
||||
sprintf_s(buffer, "Font = %s, effect = %d", font.data(), effectIndex);
|
||||
draw2d->DrawText(buffer, AZ::Vector2(xOffset, yOffset), 32);
|
||||
yOffset += 40.0f;
|
||||
draw2d->DrawText("NOTE: if the effect includes a drop shadow baked into font then the pixel size",
|
||||
@@ -1441,10 +1442,10 @@ void LyShineDebug::RenderDebug()
|
||||
switch (CV_r_DebugUIDraw2dFont)
|
||||
{
|
||||
case 1: // test font sizes (default font, effect 0)
|
||||
DebugDraw2dFontSizes(0, 0, "default");
|
||||
DebugDraw2dFontSizes("default", 0);
|
||||
break;
|
||||
case 2: // test font sizes (default font, effect 1)
|
||||
DebugDraw2dFontSizes(0, 1, "default");
|
||||
DebugDraw2dFontSizes("default", 1);
|
||||
break;
|
||||
case 3: // test font alignment
|
||||
DebugDraw2dFontAlignment();
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
#ifndef _RELEASE
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
|
||||
class ITexture;
|
||||
#include <Atom/RPI.Reflect/Image/Image.h>
|
||||
#include <AtomCore/Instance/Instance.h>
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -66,7 +68,7 @@ public: // static member functions
|
||||
|
||||
struct DebugInfoTextureUsage
|
||||
{
|
||||
ITexture* m_texture;
|
||||
AZ::Data::Instance<AZ::RPI::Image> m_texture;
|
||||
bool m_isClampTextureUsage;
|
||||
int m_numCanvasesUsed;
|
||||
int m_numDrawCallsUsed;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <Atom/RPI.Public/Image/ImageSystemInterface.h>
|
||||
|
||||
#ifndef _RELEASE
|
||||
#include <AzCore/Asset/AssetManagerBus.h>
|
||||
#include <AzFramework/IO/LocalFileIO.h>
|
||||
#endif
|
||||
|
||||
@@ -1115,7 +1116,7 @@ namespace LyShine
|
||||
|
||||
m_wasBuiltThisFrame = false;
|
||||
|
||||
AZStd::set<ITexture*> uniqueTextures;
|
||||
AZStd::set<AZ::Data::Instance<AZ::RPI::Image>> uniqueTextures;
|
||||
|
||||
// If we are rendering to the render targets this frame then record the stats for doing that
|
||||
if (m_renderToRenderTargetCount < 2)
|
||||
@@ -1144,13 +1145,11 @@ namespace LyShine
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void RenderGraph::GetDebugInfoRenderNodeList(const AZStd::vector<RenderNode*>& renderNodeList, LyShineDebug::DebugInfoRenderGraph& info, AZStd::set<ITexture*>& uniqueTextures) const
|
||||
void RenderGraph::GetDebugInfoRenderNodeList(
|
||||
const AZStd::vector<RenderNode*>& renderNodeList,
|
||||
LyShineDebug::DebugInfoRenderGraph& info,
|
||||
AZStd::set<AZ::Data::Instance<AZ::RPI::Image>>& uniqueTextures) const
|
||||
{
|
||||
AZ_UNUSED(renderNodeList);
|
||||
AZ_UNUSED(info);
|
||||
AZ_UNUSED(uniqueTextures);
|
||||
|
||||
#ifdef LYSHINE_ATOM_TODO // keeping this code for future phase (convert debug info to use Atom)
|
||||
const PrimitiveListRenderNode* prevPrimListNode = nullptr;
|
||||
bool isFirstNode = true;
|
||||
bool wasLastNodeAMask = false;
|
||||
@@ -1235,7 +1234,6 @@ namespace LyShine
|
||||
|
||||
isFirstNode = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1290,13 +1288,6 @@ namespace LyShine
|
||||
void* context,
|
||||
const AZStd::string& indent) const
|
||||
{
|
||||
AZ_UNUSED(renderNodeList);
|
||||
AZ_UNUSED(fileHandle);
|
||||
AZ_UNUSED(reportInfo);
|
||||
AZ_UNUSED(context);
|
||||
AZ_UNUSED(indent);
|
||||
|
||||
#ifdef LYSHINE_ATOM_TODO // keeping this code for future phase (convert debug info to use Atom)
|
||||
AZStd::string logLine;
|
||||
|
||||
bool previousNodeAlreadyCounted = false;
|
||||
@@ -1355,10 +1346,10 @@ namespace LyShine
|
||||
{
|
||||
for (int i = 0; i < prevPrimListNode->GetNumTextures(); ++i)
|
||||
{
|
||||
ITexture* texture = prevPrimListNode->GetTexture(i);
|
||||
AZ::Data::Instance<AZ::RPI::Image> texture = prevPrimListNode->GetTexture(i);
|
||||
if (!texture)
|
||||
{
|
||||
texture = gEnv->pRenderer->GetWhiteTexture();
|
||||
texture = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::White);
|
||||
}
|
||||
bool isClampTextureUsage = prevPrimListNode->GetTextureIsClampMode(i);
|
||||
|
||||
@@ -1405,17 +1396,19 @@ namespace LyShine
|
||||
|
||||
for (int i = 0; i < primListRenderNode->GetNumTextures(); ++i)
|
||||
{
|
||||
ITexture* texture = primListRenderNode->GetTexture(i);
|
||||
AZ::Data::Instance<AZ::RPI::Image> texture = primListRenderNode->GetTexture(i);
|
||||
if (!texture)
|
||||
{
|
||||
texture = gEnv->pRenderer->GetWhiteTexture();
|
||||
texture = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::White);
|
||||
}
|
||||
bool isClampTextureUsage = primListRenderNode->GetTextureIsClampMode(i);
|
||||
|
||||
LyShineDebug::DebugInfoTextureUsage* matchingTextureUsage = nullptr;
|
||||
|
||||
// Write line to logfile for this texture
|
||||
logLine = AZStd::string::format("%s %s\r\n", indent.c_str(), texture->GetName());
|
||||
AZStd::string textureName;
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(textureName, &AZ::Data::AssetCatalogRequests::GetAssetPathById, texture->GetAssetId());
|
||||
logLine = AZStd::string::format("%s %s\r\n", indent.c_str(), textureName.c_str());
|
||||
AZ::IO::LocalFileIO::GetInstance()->Write(fileHandle, logLine.c_str(), logLine.size());
|
||||
|
||||
// see if texture is in reportInfo
|
||||
@@ -1459,7 +1452,6 @@ namespace LyShine
|
||||
prevPrimListNode = primListRenderNode;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <IRenderer.h>
|
||||
#include <IFont.h>
|
||||
#include <LyShine/IRenderGraph.h>
|
||||
#include <AzCore/Memory/PoolAllocator.h>
|
||||
#include <AzCore/std/containers/stack.h>
|
||||
@@ -294,7 +293,10 @@ namespace LyShine
|
||||
void ValidateGraph();
|
||||
|
||||
void GetDebugInfoRenderGraph(LyShineDebug::DebugInfoRenderGraph& info) const;
|
||||
void GetDebugInfoRenderNodeList(const AZStd::vector<RenderNode*>& renderNodeList, LyShineDebug::DebugInfoRenderGraph& info, AZStd::set<ITexture*>& uniqueTextures) const;
|
||||
void GetDebugInfoRenderNodeList(
|
||||
const AZStd::vector<RenderNode*>& renderNodeList,
|
||||
LyShineDebug::DebugInfoRenderGraph& info,
|
||||
AZStd::set<AZ::Data::Instance<AZ::RPI::Image>>& uniqueTextures) const;
|
||||
|
||||
void DebugReportDrawCalls(AZ::IO::HandleType fileHandle, LyShineDebug::DebugInfoDrawCallReport& reportInfo, void* context) const;
|
||||
void DebugReportDrawCallsRenderNodeList(const AZStd::vector<RenderNode*>& renderNodeList, AZ::IO::HandleType fileHandle,
|
||||
|
||||
@@ -1425,7 +1425,8 @@ void UiCanvasManager::DebugReportDrawCalls(const AZStd::string& name) const
|
||||
if (reportTextureUsage.m_numCanvasesUsed > 1 &&
|
||||
reportTextureUsage.m_numDrawCallsWhereExceedingMaxTextures)
|
||||
{
|
||||
AZStd::string textureName = reportTextureUsage.m_texture->GetName();
|
||||
AZStd::string textureName;
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(textureName, &AZ::Data::AssetCatalogRequests::GetAssetPathById, reportTextureUsage.m_texture->GetAssetId());
|
||||
if (textureName.compare(0, fontTexturePrefix.length(), fontTexturePrefix) != 0)
|
||||
{
|
||||
logLine = AZStd::string::format("%s\r\n", textureName.c_str());
|
||||
@@ -1457,7 +1458,8 @@ void UiCanvasManager::DebugReportDrawCalls(const AZStd::string& name) const
|
||||
reportTextureUsage.m_lastContextUsed == canvas &&
|
||||
reportTextureUsage.m_numDrawCallsWhereExceedingMaxTextures)
|
||||
{
|
||||
AZStd::string textureName = reportTextureUsage.m_texture->GetName();
|
||||
AZStd::string textureName;
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(textureName, &AZ::Data::AssetCatalogRequests::GetAssetPathById, reportTextureUsage.m_texture->GetAssetId());
|
||||
|
||||
// exclude font textures
|
||||
if (textureName.compare(0, fontTexturePrefix.length(), fontTexturePrefix) != 0)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "LyShine_precompiled.h"
|
||||
#include "UiRenderer.h"
|
||||
|
||||
#include <Atom/RPI.Public/Image/ImageSystemInterface.h>
|
||||
#include <Atom/RPI.Public/DynamicDraw/DynamicDrawInterface.h>
|
||||
#include <Atom/RPI.Public/RPISystemInterface.h>
|
||||
#include <Atom/RPI.Public/RPIUtils.h>
|
||||
@@ -24,7 +25,7 @@
|
||||
#include <AzCore/Math/MatrixUtils.h>
|
||||
#include <AzCore/Debug/Trace.h>
|
||||
|
||||
#include <LyShine/IDraw2d.h>
|
||||
#include <LyShine/Draw2d.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// PUBLIC MEMBER FUNCTIONS
|
||||
@@ -353,7 +354,6 @@ void UiRenderer::DebugDisplayTextureData(int recordingOption)
|
||||
{
|
||||
if (recordingOption > 0)
|
||||
{
|
||||
#ifdef LYSHINE_ATOM_TODO
|
||||
// compute the total area of all the textures, also create a vector that we can sort by area
|
||||
AZStd::vector<ITexture*> textures;
|
||||
int totalArea = 0;
|
||||
@@ -374,15 +374,14 @@ void UiRenderer::DebugDisplayTextureData(int recordingOption)
|
||||
return lhs->GetDataSize() > rhs->GetDataSize();
|
||||
});
|
||||
|
||||
IDraw2d* draw2d = Draw2dHelper::GetDraw2d();
|
||||
CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d();
|
||||
|
||||
// setup to render lines of text for the debug display
|
||||
draw2d->BeginDraw2d(false);
|
||||
|
||||
float xOffset = 20.0f;
|
||||
float yOffset = 20.0f;
|
||||
|
||||
int blackTexture = gEnv->pRenderer->GetBlackTextureId();
|
||||
auto blackTexture = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::Black);
|
||||
float textOpacity = 1.0f;
|
||||
float backgroundRectOpacity = 0.75f;
|
||||
const float lineSpacing = 20.0f;
|
||||
@@ -432,9 +431,6 @@ void UiRenderer::DebugDisplayTextureData(int recordingOption)
|
||||
texture->GetWidth(), texture->GetHeight(), texture->GetDataSize(), texture->GetFormatName(), texture->GetName());
|
||||
WriteLine(buffer, white);
|
||||
}
|
||||
|
||||
draw2d->EndDraw2d();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <AzCore/std/containers/unordered_set.h>
|
||||
#endif
|
||||
|
||||
class ITexture;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//! UI render interface
|
||||
//
|
||||
@@ -136,8 +138,6 @@ protected: // attributes
|
||||
|
||||
#ifndef _RELEASE
|
||||
int m_debugTextureDataRecordLevel = 0;
|
||||
#ifdef LYSHINE_ATOM_TODO // Convert debug code to Atom
|
||||
AZStd::unordered_set<ITexture*> m_texturesUsedInFrame;
|
||||
#endif
|
||||
AZStd::unordered_set<ITexture*> m_texturesUsedInFrame; // LYSHINE_ATOM_TODO - convert to RPI::Image
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user