Skip to content
Permalink
Browse files

[Rendering] Splitted most of low-level rendering code into a new Xenk…

…o.Rendering assembly
  • Loading branch information
xen2 committed Feb 13, 2019
1 parent 500c4e5 commit 2cf773e19acabb86d918d0742af9c9e034b4c250
Showing 1,315 changed files with 4,217 additions and 4,118 deletions.
@@ -423,6 +423,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fr", "fr", "{62E9A8E4-79AF-
..\sources\localization\fr\Xenko.GameStudio.fr.po = ..\sources\localization\fr\Xenko.GameStudio.fr.po
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xenko.Rendering", "..\sources\engine\Xenko.Rendering\Xenko.Rendering.csproj", "{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
..\sources\shared\Xenko.NuGetResolver\Xenko.NuGetResolver.projitems*{00b72ed7-00e9-47f7-868d-8162027cd068}*SharedItemsImports = 13
@@ -1559,6 +1561,18 @@ Global
{040F754C-17F4-4B5F-B974-93F1E39D107F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{040F754C-17F4-4B5F-B974-93F1E39D107F}.Release|Win32.ActiveCfg = Release|Any CPU
{040F754C-17F4-4B5F-B974-93F1E39D107F}.Release|Win32.Build.0 = Release|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Debug|Win32.ActiveCfg = Debug|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Debug|Win32.Build.0 = Debug|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Release|Any CPU.Build.0 = Release|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Release|Win32.ActiveCfg = Release|Any CPU
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4}.Release|Win32.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1682,6 +1696,7 @@ Global
{00B72ED7-00E9-47F7-868D-8162027CD068} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
{040F754C-17F4-4B5F-B974-93F1E39D107F} = {75608B5C-1C03-4B38-810E-14EED5165E59}
{62E9A8E4-79AF-4081-84D5-FEC5A0B28598} = {FC791F56-C1F1-4C41-A193-868D8197F8E2}
{AD4FDC24-B64D-4ED7-91AA-62C9EDA12FA4} = {4C142567-C42B-40F5-B092-798882190209}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FF877973-604D-4EA7-B5F5-A129961F9EF2}
@@ -12,6 +12,7 @@
[assembly: InternalsVisibleTo("Xenko" + Xenko.PublicKeys.Default)]
[assembly: InternalsVisibleTo("Xenko.UI" + Xenko.PublicKeys.Default)]
[assembly: InternalsVisibleTo("Xenko.Engine" + Xenko.PublicKeys.Default)]
[assembly: InternalsVisibleTo("Xenko.Rendering" + Xenko.PublicKeys.Default)]
[assembly: InternalsVisibleTo("Xenko.Graphics" + Xenko.PublicKeys.Default)]
[assembly: InternalsVisibleTo("Xenko.Games" + Xenko.PublicKeys.Default)]
[assembly: InternalsVisibleTo("Xenko.Audio" + Xenko.PublicKeys.Default)]
@@ -31,9 +31,10 @@ namespace Xenko.Assets
[CategoryOrder(4050, "Splash screen")]
[NonIdentifiableCollectionItems]
[AssetFormatVersion(XenkoConfig.PackageName, CurrentVersion, "2.1.0.3")]
[AssetUpgrader(XenkoConfig.PackageName, "2.1.0.3", "3.1.0.1", typeof(RenderingSplitUpgrader))]
public partial class GameSettingsAsset : Asset
{
private const string CurrentVersion = "2.1.0.3";
private const string CurrentVersion = "3.1.0.1";

/// <summary>
/// The default file extension used by the <see cref="GameSettingsAsset"/>.
@@ -157,5 +158,21 @@ public T GetOrCreate<T>(PlatformType platform) where T : Configuration, new()

return GetOrCreate<T>();
}

// In 3.1, Xenko.Engine was splitted into a sub-assembly Xenko.Rendering
private class RenderingSplitUpgrader : AssetUpgraderBase
{
protected override void UpgradeAsset(AssetMigrationContext context, PackageVersion currentVersion, PackageVersion targetVersion, dynamic asset, PackageLoadingAssetFile assetFile, OverrideUpgraderHint overrideHint)
{
YamlNode assetNode = asset.Node;
foreach (var node in assetNode.AllNodes)
{
if (node.Tag == "!Xenko.Streaming.StreamingSettings,Xenko.Engine")
{
node.Tag = node.Tag.Replace(",Xenko.Engine", ",Xenko.Rendering");
}
}
}
}
}
}
@@ -33,9 +33,10 @@ public class SharedRendererCollection : TrackingCollection<ISharedRenderer>
[AssetContentType(typeof(GraphicsCompositor))]
[AssetDescription(FileExtension)]
[AssetFormatVersion(XenkoConfig.PackageName, CurrentVersion, "2.1.0.2")]
[AssetUpgrader(XenkoConfig.PackageName, "2.1.0.2", "3.1.0.1", typeof(RenderingSplitUpgrader))]
public partial class GraphicsCompositorAsset : Asset
{
private const string CurrentVersion = "2.1.0.2";
private const string CurrentVersion = "3.1.0.1";

/// <summary>
/// The default file extension used by the <see cref="GraphicsCompositorAsset"/>.
@@ -124,5 +125,24 @@ public GraphicsCompositor Compile(bool copyRenderers)

return graphicsCompositor;
}

// In 3.1, Xenko.Engine was splitted into a sub-assembly Xenko.Rendering
private class RenderingSplitUpgrader : AssetUpgraderBase
{
protected override void UpgradeAsset(AssetMigrationContext context, PackageVersion currentVersion, PackageVersion targetVersion, dynamic asset, PackageLoadingAssetFile assetFile, OverrideUpgraderHint overrideHint)
{
YamlNode assetNode = asset.Node;
foreach (var node in assetNode.AllNodes)
{
if (node.Tag != null && node.Tag.EndsWith(",Xenko.Engine")
// Several types are still in Xenko.Engine
&& node.Tag != "!Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine"
&& node.Tag != "!Xenko.Rendering.Compositing.SceneCameraRenderer,Xenko.Engine")
{
node.Tag = node.Tag.Replace(",Xenko.Engine", ",Xenko.Rendering");
}
}
}
}
}
}
@@ -1,6 +1,6 @@
!GraphicsCompositorAsset
Id: 823a81bf-bac0-4552-9267-aeed499c40df
SerializedVersion: {Xenko: 2.1.0.2}
SerializedVersion: {Xenko: 3.1.0.1}
Tags: []
Cameras:
de2e75c3b2b23e54162686363f3f138e:
@@ -38,73 +38,73 @@ RenderStages:
EffectSlotName: GBuffer
SortMode: !FrontToBackSortMode {}
RenderFeatures:
d8fb80b0e7995140a46bca8dc36ee8a2: !Xenko.Rendering.MeshRenderFeature,Xenko.Engine
d8fb80b0e7995140a46bca8dc36ee8a2: !Xenko.Rendering.MeshRenderFeature,Xenko.Rendering
RenderStageSelectors:
44cf4a95ef82544e9ce3c6507d5569a9: !Xenko.Rendering.MeshTransparentRenderStageSelector,Xenko.Engine
44cf4a95ef82544e9ce3c6507d5569a9: !Xenko.Rendering.MeshTransparentRenderStageSelector,Xenko.Rendering
OpaqueRenderStage: ref!! 50671147-a5c1-49d4-b4ad-3625f71439b3
TransparentRenderStage: ref!! 0fa30591-02ee-486d-9347-2b6aee83d035
EffectName: XenkoForwardShadingEffect
6f7224048750e7260ea87c444f74b32c: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Engine
6f7224048750e7260ea87c444f74b32c: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Rendering
ShadowMapRenderStage: ref!! c0524e55-4061-464d-84dd-7c4c70f70e0e
EffectName: XenkoForwardShadingEffect.ShadowMapCaster
b60663d7cb46417a94341a39c3bc1a12: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Engine
b60663d7cb46417a94341a39c3bc1a12: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Rendering
ShadowMapRenderStage: ref!! 555e84b4-b68a-4f38-ac3a-f0f563028ef0
EffectName: XenkoForwardShadingEffect.ShadowMapCasterParaboloid
f5533b1249b942df8a8aba311cd79532: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Engine
f5533b1249b942df8a8aba311cd79532: !Xenko.Rendering.Shadows.ShadowMapRenderStageSelector,Xenko.Rendering
ShadowMapRenderStage: ref!! b03a45c6-7a56-417c-8a80-69cc608671f1
EffectName: XenkoForwardShadingEffect.ShadowMapCasterCubeMap
106341b76db9fcda6a033dad16aa708b: !Xenko.Rendering.MeshTransparentRenderStageSelector,Xenko.Engine
106341b76db9fcda6a033dad16aa708b: !Xenko.Rendering.MeshTransparentRenderStageSelector,Xenko.Rendering
OpaqueRenderStage: ref!! ecab139e-5f55-42b5-a324-310c195a9c89
EffectName: XenkoForwardShadingEffect.ShadowMapCaster
PipelineProcessors:
d70f5aee0616e4ab25081ceaf643290c: !Xenko.Rendering.MeshPipelineProcessor,Xenko.Engine
d70f5aee0616e4ab25081ceaf643290c: !Xenko.Rendering.MeshPipelineProcessor,Xenko.Rendering
TransparentRenderStage: ref!! 0fa30591-02ee-486d-9347-2b6aee83d035
26c899b17f88c21ab13bf60a7220ccd1: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Engine
26c899b17f88c21ab13bf60a7220ccd1: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Rendering
ShadowMapRenderStage: ref!! c0524e55-4061-464d-84dd-7c4c70f70e0e
ff51170a7d1a4761b73ef6a5c9f0cba2: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Engine
ff51170a7d1a4761b73ef6a5c9f0cba2: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Rendering
ShadowMapRenderStage: ref!! 555e84b4-b68a-4f38-ac3a-f0f563028ef0
DepthClipping: true
ae4336b0a9514e8488e8e0ccbcef25f4: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Engine
ae4336b0a9514e8488e8e0ccbcef25f4: !Xenko.Rendering.ShadowMeshPipelineProcessor,Xenko.Rendering
ShadowMapRenderStage: ref!! b03a45c6-7a56-417c-8a80-69cc608671f1
DepthClipping: true
RenderFeatures:
86b959cbdf51a1438d4973177c77c627: !Xenko.Rendering.TransformRenderFeature,Xenko.Engine {}
8e0351fee9883922648a11016224b195: !Xenko.Rendering.SkinningRenderFeature,Xenko.Engine {}
f5a2017030ba4b28784e804807ce7628: !Xenko.Rendering.Materials.MaterialRenderFeature,Xenko.Engine {}
83fea7526ebe4893a5bad953d0502bfd: !Xenko.Rendering.Shadows.ShadowCasterRenderFeature,Xenko.Engine {}
65743b4380f4cc43b2b4bdc23cd0c07c: !Xenko.Rendering.Lights.ForwardLightingRenderFeature,Xenko.Engine
86b959cbdf51a1438d4973177c77c627: !Xenko.Rendering.TransformRenderFeature,Xenko.Rendering {}
8e0351fee9883922648a11016224b195: !Xenko.Rendering.SkinningRenderFeature,Xenko.Rendering {}
f5a2017030ba4b28784e804807ce7628: !Xenko.Rendering.Materials.MaterialRenderFeature,Xenko.Rendering {}
83fea7526ebe4893a5bad953d0502bfd: !Xenko.Rendering.Shadows.ShadowCasterRenderFeature,Xenko.Rendering {}
65743b4380f4cc43b2b4bdc23cd0c07c: !Xenko.Rendering.Lights.ForwardLightingRenderFeature,Xenko.Rendering
LightRenderers:
7ac2775468f53c4399b2f3f6357c85c9: !Xenko.Rendering.Lights.LightAmbientRenderer,Xenko.Engine {}
7b68f9cd17404a4ba9e5f7df72e3b48d: !Xenko.Rendering.Lights.LightDirectionalGroupRenderer,Xenko.Engine {}
411fdcfb9fc388449a0443173dfa3f27: !Xenko.Rendering.Lights.LightSkyboxRenderer,Xenko.Engine {}
facdcd5b543cf1c6bdf2138aab6cc473: !Xenko.Rendering.Lights.LightClusteredPointSpotGroupRenderer,Xenko.Engine {}
79582329a9cf466e960f8920f579de9b: !Xenko.Rendering.Lights.LightPointGroupRenderer,Xenko.Engine {}
cf0c6bd4198b4cc4aaaab5b54870bdfd: !Xenko.Rendering.Lights.LightSpotGroupRenderer,Xenko.Engine {}
451af18f3f5c4187cf3fe5f33feb46b1: !Xenko.Rendering.LightProbes.LightProbeRenderer,Xenko.Engine {}
ShadowMapRenderer: !Xenko.Rendering.Shadows.ShadowMapRenderer,Xenko.Engine
7ac2775468f53c4399b2f3f6357c85c9: !Xenko.Rendering.Lights.LightAmbientRenderer,Xenko.Rendering {}
7b68f9cd17404a4ba9e5f7df72e3b48d: !Xenko.Rendering.Lights.LightDirectionalGroupRenderer,Xenko.Rendering {}
411fdcfb9fc388449a0443173dfa3f27: !Xenko.Rendering.Lights.LightSkyboxRenderer,Xenko.Rendering {}
facdcd5b543cf1c6bdf2138aab6cc473: !Xenko.Rendering.Lights.LightClusteredPointSpotGroupRenderer,Xenko.Rendering {}
79582329a9cf466e960f8920f579de9b: !Xenko.Rendering.Lights.LightPointGroupRenderer,Xenko.Rendering {}
cf0c6bd4198b4cc4aaaab5b54870bdfd: !Xenko.Rendering.Lights.LightSpotGroupRenderer,Xenko.Rendering {}
451af18f3f5c4187cf3fe5f33feb46b1: !Xenko.Rendering.LightProbes.LightProbeRenderer,Xenko.Rendering {}
ShadowMapRenderer: !Xenko.Rendering.Shadows.ShadowMapRenderer,Xenko.Rendering
Renderers:
7c3d3d4c86834c3551bacde2527b3836: !Xenko.Rendering.Shadows.LightDirectionalShadowMapRenderer,Xenko.Engine
7c3d3d4c86834c3551bacde2527b3836: !Xenko.Rendering.Shadows.LightDirectionalShadowMapRenderer,Xenko.Rendering
ShadowCasterRenderStage: ref!! c0524e55-4061-464d-84dd-7c4c70f70e0e
1c204b09435636256a3fcfd6f9ddb347: !Xenko.Rendering.Shadows.LightSpotShadowMapRenderer,Xenko.Engine
1c204b09435636256a3fcfd6f9ddb347: !Xenko.Rendering.Shadows.LightSpotShadowMapRenderer,Xenko.Rendering
ShadowCasterRenderStage: ref!! c0524e55-4061-464d-84dd-7c4c70f70e0e
7c8c69ce27034b4c8bbcab0bcdfe954b: !Xenko.Rendering.Shadows.LightPointShadowMapRendererParaboloid,Xenko.Engine
7c8c69ce27034b4c8bbcab0bcdfe954b: !Xenko.Rendering.Shadows.LightPointShadowMapRendererParaboloid,Xenko.Rendering
ShadowCasterRenderStage: ref!! 555e84b4-b68a-4f38-ac3a-f0f563028ef0
d59ef45dd99e49d3af3887763d153aa7: !Xenko.Rendering.Shadows.LightPointShadowMapRendererCubeMap,Xenko.Engine
d59ef45dd99e49d3af3887763d153aa7: !Xenko.Rendering.Shadows.LightPointShadowMapRendererCubeMap,Xenko.Rendering
ShadowCasterRenderStage: ref!! b03a45c6-7a56-417c-8a80-69cc608671f1
28e9bf54a5adbe063f59fb17acb2723e: !Xenko.Rendering.Sprites.SpriteRenderFeature,Xenko.Engine
28e9bf54a5adbe063f59fb17acb2723e: !Xenko.Rendering.Sprites.SpriteRenderFeature,Xenko.Rendering
RenderStageSelectors:
d74665cff080638a2439c4422e542d85: !Xenko.Rendering.Sprites.SpriteTransparentRenderStageSelector,Xenko.Engine
d74665cff080638a2439c4422e542d85: !Xenko.Rendering.Sprites.SpriteTransparentRenderStageSelector,Xenko.Rendering
OpaqueRenderStage: ref!! 50671147-a5c1-49d4-b4ad-3625f71439b3
TransparentRenderStage: ref!! 0fa30591-02ee-486d-9347-2b6aee83d035
EffectName: Test
60780391e205770513fdd53e07279a01: !Xenko.Rendering.Background.BackgroundRenderFeature,Xenko.Engine
60780391e205770513fdd53e07279a01: !Xenko.Rendering.Background.BackgroundRenderFeature,Xenko.Rendering
RenderStageSelectors:
11c8b8ccb522e3cd1dd6688016062a6d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Engine
11c8b8ccb522e3cd1dd6688016062a6d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Rendering
RenderStage: ref!! 50671147-a5c1-49d4-b4ad-3625f71439b3
EffectName: Test
93933ad00d0c357d4915ad462cbfd04c: !Xenko.Rendering.UI.UIRenderFeature,Xenko.UI
RenderStageSelectors:
14a071694411235038a102ac3794bb4d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Engine
14a071694411235038a102ac3794bb4d: !Xenko.Rendering.SimpleGroupToRenderStageSelector,Xenko.Rendering
RenderStage: ref!! 0fa30591-02ee-486d-9347-2b6aee83d035
EffectName: Test
9013eab3ea0ef6c98bf133b86c173d45: !Xenko.Particles.Rendering.ParticleEmitterRenderFeature,Xenko.Particles
@@ -181,16 +181,16 @@ SharedRenderers:
Enabled: false
Color: {R: 0.0, G: 0.0, B: 0.0}
Antialiasing: !FXAAEffect {}
ee80a20a9bd99f2d70711114e15fe7ca: !Xenko.Rendering.Compositing.DebugRenderer,Xenko.Engine
ee80a20a9bd99f2d70711114e15fe7ca: !Xenko.Rendering.Compositing.DebugRenderer,Xenko.Rendering
Id: f15a53d4-4af3-4b1d-8783-bdb49d3c96e2
DebugRenderStages: {}
Game: !Xenko.Rendering.Compositing.SceneCameraRenderer,Xenko.Engine
Id: 76fe87cf-f574-4ad6-85b8-e9a9586be0e2
Camera: ref!! d0a6bf72-b3cd-4bd4-94ca-69952999d537
Child: !Xenko.Rendering.Compositing.SceneRendererCollection,Xenko.Engine
Child: !Xenko.Rendering.Compositing.SceneRendererCollection,Xenko.Rendering
Id: 82568e46-92e7-421a-8dca-114a74e0cd69
Children:
d39c5ddbf8b7d5ca02bafb6496b1cc3c: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 4d409a59-d3c6-4b55-a5c7-4bd9b8886ea5
01d338078e9b21121ead0868932613dd: !Xenko.Rendering.Compositing.DebugRenderer,Xenko.Engine ref!! f15a53d4-4af3-4b1d-8783-bdb49d3c96e2
01d338078e9b21121ead0868932613dd: !Xenko.Rendering.Compositing.DebugRenderer,Xenko.Rendering ref!! f15a53d4-4af3-4b1d-8783-bdb49d3c96e2
SingleView: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 776f2112-aca9-4510-9db5-6b13b6d795d7
Editor: !Xenko.Rendering.Compositing.ForwardRenderer,Xenko.Engine ref!! 4d409a59-d3c6-4b55-a5c7-4bd9b8886ea5

0 comments on commit 2cf773e

Please sign in to comment.
You can’t perform that action at this time.