Merge remote-tracking branch 'origin/master' into sdl_platform

This commit is contained in:
2025-10-24 18:31:50 +03:00
7 changed files with 14 additions and 8 deletions

BIN
Content/Shaders/MotionBlur.flax (Stored with Git LFS)

Binary file not shown.

View File

@@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors
menu.AddButton("Copy", linkedEditor.Copy);
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly && Editor._canResize;
b.Enabled = !Editor._readOnly && Editor._canResize;
b = menu.AddButton("Paste", linkedEditor.Paste);
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
@@ -407,7 +407,7 @@ namespace FlaxEditor.CustomEditors.Editors
menu.AddButton("Copy", linkedEditor.Copy);
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly && Editor._canResize;
b.Enabled = !Editor._readOnly && Editor._canResize;
var paste = menu.AddButton("Paste", linkedEditor.Paste);
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;

View File

@@ -208,7 +208,7 @@ public:
typedef typename FallbackAllocation::template Data<T> FallbackData;
bool _useFallback = false;
byte _data[Capacity * sizeof(T)];
alignas(sizeof(void*)) byte _data[Capacity * sizeof(T)];
FallbackData _fallback;
public:

View File

@@ -30,6 +30,9 @@ GPU_CB_STRUCT(Data {
Float2 Input0SizeInv;
Float2 Input2SizeInv;
Float3 PrevWorldOriginOffset;
float Dummy1;
});
MotionBlurPass::MotionBlurPass()
@@ -194,6 +197,7 @@ void MotionBlurPass::RenderMotionVectors(RenderContext& renderContext)
Matrix::Transpose(renderContext.View.ViewProjection(), data.CurrentVP);
Matrix::Transpose(renderContext.View.PrevViewProjection, data.PreviousVP);
data.TemporalAAJitter = renderContext.View.TemporalAAJitter;
data.PrevWorldOriginOffset = renderContext.View.Origin - renderContext.View.PrevOrigin;
auto cb = _shader->GetShader()->GetCB(0);
context->UpdateCB(cb, &data);
context->BindCB(0, cb);

View File

@@ -563,8 +563,8 @@ FORCE_INLINE int32 GetVTableIndex(void** vtable, int32 entriesCount, void* func)
offset = ((*op & 0x3FFC00) >> 10) * ((*op & 0x40000000) != 0 ? 8 : 4);
return offset / sizeof(void*);
}
CRASH;
}
CRASH;
#elif defined(__clang__)
// On Clang member function pointer represents the offset from the vtable begin.
return (int32)(intptr)func / sizeof(void*);

View File

@@ -21,6 +21,8 @@ int MaxBlurSamples;
uint VariableTileLoopCount;
float2 Input0SizeInv;
float2 Input2SizeInv;
float3 PrevWorldOriginOffset;
float Dummy1;
META_CB_END
DECLARE_GBUFFERDATA_ACCESS(GBuffer)
@@ -39,7 +41,7 @@ float4 PS_CameraMotionVectors(Quad_VS2PS input) : SV_Target
GBufferData gBufferData = GetGBufferData();
float4 worldPos = float4(GetWorldPos(gBufferData, input.TexCoord, deviceDepth), 1);
float4 prevClipPos = mul(worldPos, PreviousVP);
float4 prevClipPos = mul(worldPos + float4(PrevWorldOriginOffset, 0), PreviousVP);
float4 curClipPos = mul(worldPos, CurrentVP);
float2 prevHPos = prevClipPos.xy / prevClipPos.w;
float2 curHPos = curClipPos.xy / curClipPos.w;

View File

@@ -20,7 +20,7 @@ namespace Flax.Build
/// Specifies the minimum CPU architecture type to support (on x86/x64).
/// </summary>
[CommandLine("winCpuArch", "<arch>", "Specifies the minimum CPU architecture type to support (om x86/x64).")]
public static CpuArchitecture WindowsCpuArch = CpuArchitecture.AVX2; // 94.48% support on PC according to Steam Hardware & Software Survey: May 2025 (https://store.steampowered.com/hwsurvey/)
public static CpuArchitecture WindowsCpuArch = CpuArchitecture.SSE4_2; // 99.78% support on PC according to Steam Hardware & Software Survey: September 2025 (https://store.steampowered.com/hwsurvey/)
}
}