While trying to implement a global shader, I get this error:
Assertion failed: AlignedOffset == TypeLayout.Size [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Serialization/MemoryImage.cpp] [Line: 224]
[FMyComputeShader] Calculated Size: 280, Real Size: 288
It appears that the calculated AlignedOffset
, and the provided TypeLayout.Size
are different. I followed the callstack to see where TypeLayout.Size
is being set, but I end up at the IMPLMEMENT_GLOBAL_SHADER
macro without ever seeing where/how TypeLayout.Size
is set, though I assume that it has to do with the data necessary to store the shader in main memory?
Does anyone have some knowledge as to how Shaders are initialized/compiled? Unsure as to exactly what data in my global shader might influence this TypeLayout.Size
, and why there would be discrepancies in the alignment/size.