Add **Global Sign Distance Field** rendering (work in progress)

This commit is contained in:
Wojciech Figat
2022-03-18 16:18:00 +01:00
parent 10d09711d9
commit 8cca7f884b
18 changed files with 1109 additions and 5 deletions

View File

@@ -350,6 +350,8 @@ void SplineModel::Draw(RenderContext& renderContext)
if (!_spline || !Model || !Model->IsLoaded() || !Model->CanBeRendered() || actorDrawModes == DrawPass::None)
return;
auto model = Model.Get();
if (renderContext.View.Pass == DrawPass::GlobalSDF)
return; // TODO: Spline Model rendering to Global SDF
if (!Entries.IsValidFor(model))
Entries.Setup(model);
@@ -469,6 +471,10 @@ void SplineModel::Deserialize(DeserializeStream& stream, ISerializeModifier* mod
DESERIALIZE(DrawModes);
Entries.DeserializeIfExists(stream, "Buffer", modifier);
// [Deprecated on 07.02.2022, expires on 07.02.2024]
if (modifier->EngineBuild <= 6330)
DrawModes |= DrawPass::GlobalSDF;
}
void SplineModel::OnTransformChanged()