Add **Model SDF baking on GPU** via Compute Shader

This commit is contained in:
Wojtek Figat
2024-05-29 14:53:13 +02:00
parent 5f4c57d3eb
commit 53d77d3421
11 changed files with 793 additions and 92 deletions

View File

@@ -298,11 +298,12 @@ namespace FlaxEditor.Windows.Assets
proxy.Window.Enabled = false;
Task.Run(() =>
{
proxy.Asset.GenerateSDF(proxy.Window._importSettings.Settings.SDFResolution, _sdfModelLodIndex.Value, true, proxy.Window._backfacesThreshold);
bool failed = proxy.Asset.GenerateSDF(proxy.Window._importSettings.Settings.SDFResolution, _sdfModelLodIndex.Value, true, proxy.Window._backfacesThreshold);
FlaxEngine.Scripting.InvokeOnUpdate(() =>
{
proxy.Window.Enabled = true;
proxy.Window.MarkAsEdited();
if (!failed)
proxy.Window.MarkAsEdited();
Presenter.BuildLayoutOnUpdate();
});
});