Interact with Materials from scripts

This commit is contained in:
Simon Lübeß
2025-02-14 11:54:07 +01:00
parent e5437c6ff6
commit aaed4199d3
24 changed files with 739 additions and 64 deletions
+4 -3
View File
@@ -187,11 +187,12 @@ class TextureViewer
Width = 100,
Height = 100,
ColorTargetDescriptions = TargetDescription[](
.(.R8G8B8A8_UNorm, clearColor: .Color(ColorRGBA.Pink)),
.(.R32_UInt)
.(.R8G8B8A8_UNorm, clearColor: .Color(ColorRGBA.Pink), ownDebugName: new $"Color"),
.(.R32_UInt, ownDebugName: new $"Enity ID (Unused)")
),
DepthTargetDescription = .(.D24_UNorm_S8_UInt)
DepthTargetDescription = .(.D24_UNorm_S8_UInt, ownDebugName: new $"Depth Stencil")
});
_targets.[Friend]Identifier = "Asset Viewer";
}
float2 _position;
+5 -2
View File
@@ -342,11 +342,12 @@ namespace GlitchyEditor
Width = 100,
Height = 100,
ColorTargetDescriptions = TargetDescription[](
.(.R16G16B16A16_Float),
.(.R32_UInt)
.(.R16G16B16A16_Float, ownDebugName: new String("HDR Color")),
.(.R32_UInt, ownDebugName: new String("EntityID"))
),
DepthTargetDescription = .(.D24_UNorm_S8_UInt)
});
_cameraTarget.[Friend]Identifier = "Camera Target";
_editorViewportTarget = new RenderTargetGroup(.()
{
@@ -355,6 +356,7 @@ namespace GlitchyEditor
ColorTargetDescriptions = TargetDescription[](
.(.R8G8B8A8_UNorm))
});
_editorViewportTarget.[Friend]Identifier = "Editor Viewport Target";
_gameViewportTarget = new RenderTargetGroup(.()
{
@@ -363,6 +365,7 @@ namespace GlitchyEditor
ColorTargetDescriptions = TargetDescription[](
.(.R8G8B8A8_UNorm))
});
_editorViewportTarget.[Friend]Identifier = "Game Viewport Target";
_editorIcons = new EditorIcons("Resources/Textures/EditorIcons.dds", .(64, 64));
_editorIcons.SamplerState = SamplerStateManager.AnisotropicClamp;