Merge remote-tracking branch 'origin/master' into sdl_platform
This commit is contained in:
BIN
Content/Shaders/MotionBlur.flax
(Stored with Git LFS)
BIN
Content/Shaders/MotionBlur.flax
(Stored with Git LFS)
Binary file not shown.
@@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
|
|
||||||
menu.AddButton("Copy", linkedEditor.Copy);
|
menu.AddButton("Copy", linkedEditor.Copy);
|
||||||
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
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 = menu.AddButton("Paste", linkedEditor.Paste);
|
||||||
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
|
|
||||||
menu.AddButton("Copy", linkedEditor.Copy);
|
menu.AddButton("Copy", linkedEditor.Copy);
|
||||||
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
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);
|
var paste = menu.AddButton("Paste", linkedEditor.Paste);
|
||||||
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public:
|
|||||||
typedef typename FallbackAllocation::template Data<T> FallbackData;
|
typedef typename FallbackAllocation::template Data<T> FallbackData;
|
||||||
|
|
||||||
bool _useFallback = false;
|
bool _useFallback = false;
|
||||||
byte _data[Capacity * sizeof(T)];
|
alignas(sizeof(void*)) byte _data[Capacity * sizeof(T)];
|
||||||
FallbackData _fallback;
|
FallbackData _fallback;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ GPU_CB_STRUCT(Data {
|
|||||||
|
|
||||||
Float2 Input0SizeInv;
|
Float2 Input0SizeInv;
|
||||||
Float2 Input2SizeInv;
|
Float2 Input2SizeInv;
|
||||||
|
|
||||||
|
Float3 PrevWorldOriginOffset;
|
||||||
|
float Dummy1;
|
||||||
});
|
});
|
||||||
|
|
||||||
MotionBlurPass::MotionBlurPass()
|
MotionBlurPass::MotionBlurPass()
|
||||||
@@ -194,6 +197,7 @@ void MotionBlurPass::RenderMotionVectors(RenderContext& renderContext)
|
|||||||
Matrix::Transpose(renderContext.View.ViewProjection(), data.CurrentVP);
|
Matrix::Transpose(renderContext.View.ViewProjection(), data.CurrentVP);
|
||||||
Matrix::Transpose(renderContext.View.PrevViewProjection, data.PreviousVP);
|
Matrix::Transpose(renderContext.View.PrevViewProjection, data.PreviousVP);
|
||||||
data.TemporalAAJitter = renderContext.View.TemporalAAJitter;
|
data.TemporalAAJitter = renderContext.View.TemporalAAJitter;
|
||||||
|
data.PrevWorldOriginOffset = renderContext.View.Origin - renderContext.View.PrevOrigin;
|
||||||
auto cb = _shader->GetShader()->GetCB(0);
|
auto cb = _shader->GetShader()->GetCB(0);
|
||||||
context->UpdateCB(cb, &data);
|
context->UpdateCB(cb, &data);
|
||||||
context->BindCB(0, cb);
|
context->BindCB(0, cb);
|
||||||
|
|||||||
@@ -563,8 +563,8 @@ FORCE_INLINE int32 GetVTableIndex(void** vtable, int32 entriesCount, void* func)
|
|||||||
offset = ((*op & 0x3FFC00) >> 10) * ((*op & 0x40000000) != 0 ? 8 : 4);
|
offset = ((*op & 0x3FFC00) >> 10) * ((*op & 0x40000000) != 0 ? 8 : 4);
|
||||||
return offset / sizeof(void*);
|
return offset / sizeof(void*);
|
||||||
}
|
}
|
||||||
CRASH;
|
|
||||||
}
|
}
|
||||||
|
CRASH;
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
// On Clang member function pointer represents the offset from the vtable begin.
|
// On Clang member function pointer represents the offset from the vtable begin.
|
||||||
return (int32)(intptr)func / sizeof(void*);
|
return (int32)(intptr)func / sizeof(void*);
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ int MaxBlurSamples;
|
|||||||
uint VariableTileLoopCount;
|
uint VariableTileLoopCount;
|
||||||
float2 Input0SizeInv;
|
float2 Input0SizeInv;
|
||||||
float2 Input2SizeInv;
|
float2 Input2SizeInv;
|
||||||
|
float3 PrevWorldOriginOffset;
|
||||||
|
float Dummy1;
|
||||||
META_CB_END
|
META_CB_END
|
||||||
|
|
||||||
DECLARE_GBUFFERDATA_ACCESS(GBuffer)
|
DECLARE_GBUFFERDATA_ACCESS(GBuffer)
|
||||||
@@ -39,7 +41,7 @@ float4 PS_CameraMotionVectors(Quad_VS2PS input) : SV_Target
|
|||||||
GBufferData gBufferData = GetGBufferData();
|
GBufferData gBufferData = GetGBufferData();
|
||||||
float4 worldPos = float4(GetWorldPos(gBufferData, input.TexCoord, deviceDepth), 1);
|
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);
|
float4 curClipPos = mul(worldPos, CurrentVP);
|
||||||
float2 prevHPos = prevClipPos.xy / prevClipPos.w;
|
float2 prevHPos = prevClipPos.xy / prevClipPos.w;
|
||||||
float2 curHPos = curClipPos.xy / curClipPos.w;
|
float2 curHPos = curClipPos.xy / curClipPos.w;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Flax.Build
|
|||||||
/// Specifies the minimum CPU architecture type to support (on x86/x64).
|
/// Specifies the minimum CPU architecture type to support (on x86/x64).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[CommandLine("winCpuArch", "<arch>", "Specifies the minimum CPU architecture type to support (om x86/x64).")]
|
[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/)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user