-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Official Release
4.2.1.2487
Windows
I am building a custom IMaterialDisplacementFeature like so:
using Stride.Rendering.Materials;
using Stride.Shaders;
using Stride.Core;
namespace GoatTrackGolf.Effects {
[DataContract("BladedGrassDisplacementFeature")]
[Display("Bladed Grass Displacement")]
public class BladedGrassDisplacementFeature : MaterialFeature, IMaterialDisplacementFeature {
public BladedGrassDisplacementFeature() { }
public override void GenerateShader(MaterialGeneratorContext context) {
context.SetStreamFinalModifier<BladedGrassDisplacementFeature>(
MaterialShaderStage.Vertex,
new ShaderClassSource("BladedGrassDisplacement", "Position"));
}
}
}
and referencing it in a material like this:

When running the game or saving/building in the game studio this works just fine, but when reloading assemblies and updating scripts in the game studio I get the following exception (which appears to originate inside the AssetDependencyManager somewhere?):
Application: GameStudio
UserEmail:
UserMessage:
StrideVersion: 4.2.1.2487
GameStudioVersion: 4
ThreadName: Main thread
DefaultGraphicProfile: Level_11_0
OpenedAssets: 1fc7b102-86b7-4df7-88b1-8bc377b6176b:MainScene (Scene)
efe472b6-e2a8-4d09-9dec-8649a3b59910:MenuScene (Scene)
529f1ed4-72a5-4189-b42d-8e81ccccfe8a:GameScene (Scene)
LastActions:
CurrentDirectory: %USERPROFILE%\.nuget\packages\stride.gamestudio\4.2.1.2487\lib\net8.0-windows7.0
CommandArgs: %USERPROFILE%\Code\Source\Repos\goat-track-golf\GoatTrackGolf\GoatTrackGolf.sln
OsVersion: Microsoft Windows 11 Home 10.0.26100 x64
ProcessorCount: 8
Exception: ArgumentException: No serializer available for type GoatTrackGolf.Effects.BladedGrassDisplacementFeature
at Stride.Core.Serialization.MemberReuseSerializer`1.Serialize(T& obj, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\MemberSerializerGenerated.cs:line 1183
at Stride.Core.DataSerializers.StrideRenderingMaterials_MaterialAttributesSerializer.Serialize(MaterialAttributes& obj, ArchiveMode mode, SerializationStream stream)
at Stride.Core.Serialization.MemberReuseSerializer`1.Serialize(T& obj, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\MemberSerializerGenerated.cs:line 1225
at Stride.Core.DataSerializers.StrideAssetsMaterials_MaterialAssetSerializer.Serialize(MaterialAsset& obj, ArchiveMode mode, SerializationStream stream)
at Stride.Core.Serialization.DataSerializer`1.Serialize(Object& obj, ArchiveMode mode, SerializationStream stream) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\DataSerializer.cs:line 80
at Stride.Core.Serialization.MemberReuseSerializer`1.SerializeExtended(T& obj, ArchiveMode mode, SerializationStream stream, DataSerializer`1 dataSerializer) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core\Serialization\MemberSerializerGenerated.cs:line 1429
at Stride.Core.Assets.AssetCloner..ctor(Object value, AssetClonerFlags flags, IEnumerable`1 externalIdentifiables) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\assets\Stride.Core.Assets\AssetCloner.cs:line 73
at Stride.Core.Assets.Analysis.AssetDependencyManager.Session_AssetDirtyChanged(AssetItem asset, Boolean oldValue, Boolean newValue) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\assets\Stride.Core.Assets\Analysis\AssetDependencyManager.cs:line 519
at Stride.Core.Presentation.ViewModels.DirtiableEditableViewModel.Stride.Core.Presentation.Dirtiables.IDirtiable.UpdateDirtiness(Boolean value) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\presentation\Stride.Core.Presentation\ViewModels\DirtiableEditableViewModel.cs:line 52
at Stride.Core.Presentation.Dirtiables.DirtiableManager.UpdateDirtiables(HashSet`1 dirtiables) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\presentation\Stride.Core.Presentation\Dirtiables\DirtiableManager.cs:line 121
at Stride.Core.Presentation.Dirtiables.DirtiableManager.TransactionCompleted(Object sender, TransactionEventArgs e) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\presentation\Stride.Core.Presentation\Dirtiables\DirtiableManager.cs:line 138
at Stride.Core.Transactions.TransactionStack.CompleteTransaction(Transaction transaction) in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core.Design\Transactions\TransactionStack.cs:line 202
at Stride.Core.Transactions.Transaction.Complete() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core.Design\Transactions\Transaction.cs:line 75
at Stride.Core.Transactions.Transaction.Dispose() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\core\Stride.Core.Design\Transactions\Transaction.cs:line 45
at Stride.GameStudio.ViewModels.DebuggingViewModel.ReloadAssemblies() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\editor\Stride.GameStudio\ViewModels\DebuggingViewModel.cs:line 303
at Stride.Core.Presentation.Commands.AnonymousTaskCommand.<>c__DisplayClass0_0.<<-ctor>b__0>d.MoveNext() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\presentation\Stride.Core.Presentation\Commands\AnonymousCommand.cs:line 84
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at Stride.GameStudio.Program.Main() in C:\BuildAgent\work\b5f46e3c4829a09e\sources\editor\Stride.GameStudio\Program.cs:line 148
GPU0.AdapterCompatibility: NVIDIA
GPU0.AdapterDACType: Integrated RAMDAC
GPU0.AdapterRAM: 4293918720
GPU0.Availability: 3
GPU0.Caption: NVIDIA GeForce RTX 2060
GPU0.ConfigManagerErrorCode: 0
GPU0.ConfigManagerUserConfig: False
GPU0.CreationClassName: Win32_VideoController
GPU0.CurrentBitsPerPixel: 32
GPU0.CurrentHorizontalResolution: 2560
GPU0.CurrentNumberOfColors: 4294967296
GPU0.CurrentNumberOfColumns: 0
GPU0.CurrentNumberOfRows: 0
GPU0.CurrentRefreshRate: 144
GPU0.CurrentScanMode: 4
GPU0.CurrentVerticalResolution: 1440
GPU0.Description: NVIDIA GeForce RTX 2060
GPU0.DeviceID: VideoController1
GPU0.DitherType: 0
GPU0.DriverDate: 20240529000000.000000-000
GPU0.DriverVersion: 32.0.15.5597
GPU0.InfFilename: oem60.inf
GPU0.InfSection: Section083
GPU0.InstalledDisplayDrivers: C:\WINDOWS\System32\DriverStore\FileRepository\nvam.inf_amd64_900a074fe80431cd\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvam.inf_amd64_900a074fe80431cd\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvam.inf_amd64_900a074fe80431cd\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvam.inf_amd64_900a074fe80431cd\nvldumdx.dll
GPU0.MaxRefreshRate: 0
GPU0.Monochrome: False
GPU0.Name: NVIDIA GeForce RTX 2060
GPU0.PNPDeviceID: PCI\VEN_10DE&DEV_1F11&SUBSYS_140F1043&REV_A1\4&C6920CC&0&0009
GPU0.Status: OK
GPU0.SystemCreationClassName: Win32_ComputerSystem
GPU0.SystemName: LAPTOP-V7JE87VF
GPU0.VideoArchitecture: 5
GPU0.VideoMemoryType: 2
GPU0.VideoModeDescription: 2560 x 1440 x 4294967296 colors
GPU0.VideoProcessor: NVIDIA GeForce RTX 2060
GPU1.AdapterCompatibility: Advanced Micro Devices, Inc.
GPU1.AdapterDACType: Internal DAC(400MHz)
GPU1.AdapterRAM: 2147483648
GPU1.Availability: 3
GPU1.Caption: AMD Radeon(TM) Vega 8 Graphics
GPU1.ConfigManagerErrorCode: 0
GPU1.ConfigManagerUserConfig: False
GPU1.CreationClassName: Win32_VideoController
GPU1.CurrentBitsPerPixel: 32
GPU1.CurrentHorizontalResolution: 1920
GPU1.CurrentNumberOfColors: 4294967296
GPU1.CurrentNumberOfColumns: 0
GPU1.CurrentNumberOfRows: 0
GPU1.CurrentRefreshRate: 120
GPU1.CurrentScanMode: 4
GPU1.CurrentVerticalResolution: 1080
GPU1.Description: AMD Radeon(TM) Vega 8 Graphics
GPU1.DeviceID: VideoController2
GPU1.DitherType: 0
GPU1.DriverDate: 20200811000000.000000-000
GPU1.DriverVersion: 27.20.1032.2
GPU1.InfFilename: oem2.inf
GPU1.InfSection: ati2mtag_Picasso
GPU1.InstalledDisplayDrivers: C:\WINDOWS\System32\DriverStore\FileRepository\u0361708.inf_amd64_7de6b99937f60751\B358199\aticfx64.dll,C:\WINDOWS\System32\DriverStore\FileRepository\u0361708.inf_amd64_7de6b99937f60751\B358199\aticfx64.dll,C:\WINDOWS\System32\DriverStore\FileRepository\u0361708.inf_amd64_7de6b99937f60751\B358199\aticfx64.dll,C:\WINDOWS\System32\DriverStore\FileRepository\u0361708.inf_amd64_7de6b99937f60751\B358199\amdxc64.dll
GPU1.MaxRefreshRate: 120
GPU1.MinRefreshRate: 48
GPU1.Monochrome: False
GPU1.Name: AMD Radeon(TM) Vega 8 Graphics
GPU1.PNPDeviceID: PCI\VEN_1002&DEV_15D8&SUBSYS_18F11043&REV_C2\4&18C8F581&0&0041
GPU1.Status: OK
GPU1.SystemCreationClassName: Win32_ComputerSystem
GPU1.SystemName: LAPTOP-V7JE87VF
GPU1.VideoArchitecture: 5
GPU1.VideoMemoryType: 2
GPU1.VideoModeDescription: 1920 x 1080 x 4294967296 colors
GPU1.VideoProcessor: AMD Radeon Graphics Processor (0x15D8)
Log: 1: WorldObjects/Surfaces/Short/Fairway(0,0): []: Fatal: The asset WorldObjects/Surfaces/Short/Fairway is missing or incorrectly indexed in the package. Please report this issue.
2: WorldObjects/Surfaces/Short/ShortCut(0,0): []: Fatal: The asset WorldObjects/Surfaces/Short/ShortCut is missing or incorrectly indexed in the package. Please report this issue.
3: WorldObjects/Surfaces/Short/Green(0,0): []: Fatal: The asset WorldObjects/Surfaces/Short/Green is missing or incorrectly indexed in the package. Please report this issue.
4: WorldObjects/Surfaces/Short/ShortCutChunk(0,0): []: Fatal: The asset WorldObjects/Surfaces/Short/ShortCutChunk is missing or incorrectly indexed in the package. Please report this issue.
5: GoatTrackGolfApp(0,0): []: Fatal: The asset GoatTrackGolfApp is missing or incorrectly indexed in the package. Please report this issue.
I also see several "fatal" errors at the bottom which I am unsure how to relate to the ArgumentException at the top.
If this is an issue with the way I am creating the custom effect feature, please let me know. Otherwise I will assume that this is supposed to work and there must be some sort of corner-case I am hitting here with the serialization of my custom material displacement feature.
Thank you!