@@ -1027,6 +1027,7 @@ void AnimatedModel::Draw(RenderContext& renderContext)
|
||||
draw.LODBias = LODBias;
|
||||
draw.ForcedLOD = ForcedLOD;
|
||||
draw.SortOrder = SortOrder;
|
||||
draw.SetStencilValue(_layer);
|
||||
|
||||
SkinnedModel->Draw(renderContext, draw);
|
||||
}
|
||||
@@ -1068,6 +1069,7 @@ void AnimatedModel::Draw(RenderContextBatch& renderContextBatch)
|
||||
draw.LODBias = LODBias;
|
||||
draw.ForcedLOD = ForcedLOD;
|
||||
draw.SortOrder = SortOrder;
|
||||
draw.SetStencilValue(_layer);
|
||||
|
||||
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||
if (ShadowsMode != ShadowsCastingMode::All)
|
||||
|
||||
@@ -374,6 +374,7 @@ void Camera::Draw(RenderContext& renderContext)
|
||||
BoundingSphere::FromBox(_previewModelBox, draw.Bounds);
|
||||
draw.Bounds.Center -= renderContext.View.Origin;
|
||||
draw.PerInstanceRandom = GetPerInstanceRandom();
|
||||
draw.StencilValue = 0;
|
||||
draw.LODBias = 0;
|
||||
draw.ForcedLOD = -1;
|
||||
draw.SortOrder = 0;
|
||||
|
||||
@@ -107,7 +107,6 @@ void Skybox::ApplySky(GPUContext* context, RenderContext& renderContext, const M
|
||||
drawCall.ObjectPosition = drawCall.World.GetTranslation();
|
||||
drawCall.ObjectRadius = (float)_sphere.Radius;
|
||||
drawCall.Surface.GeometrySize = _box.GetSize();
|
||||
drawCall.WorldDeterminantSign = RenderTools::GetWorldDeterminantSign(drawCall.World);
|
||||
drawCall.PerInstanceRandom = GetPerInstanceRandom();
|
||||
MaterialBase::BindParameters bindParams(context, renderContext, drawCall);
|
||||
bindParams.BindViewData();
|
||||
|
||||
@@ -407,12 +407,12 @@ void SplineModel::Draw(RenderContext& renderContext)
|
||||
drawCall.Deformable.MeshMaxZ = _meshMaxZ;
|
||||
drawCall.Deformable.GeometrySize = _box.GetSize();
|
||||
drawCall.PerInstanceRandom = GetPerInstanceRandom();
|
||||
drawCall.SetStencilValue(_layer);
|
||||
_preTransform.GetWorld(drawCall.Deformable.LocalMatrix);
|
||||
const Transform splineTransform = GetTransform();
|
||||
renderContext.View.GetWorldMatrix(splineTransform, drawCall.World);
|
||||
drawCall.ObjectPosition = drawCall.World.GetTranslation() + drawCall.Deformable.LocalMatrix.GetTranslation();
|
||||
drawCall.ObjectRadius = (float)_sphere.Radius; // TODO: use radius for the spline chunk rather than whole spline
|
||||
const float worldDeterminantSign = drawCall.World.RotDeterminant() * drawCall.Deformable.LocalMatrix.RotDeterminant();
|
||||
for (int32 segment = 0; segment < _instances.Count(); segment++)
|
||||
{
|
||||
auto& instance = _instances[segment];
|
||||
@@ -468,7 +468,6 @@ void SplineModel::Draw(RenderContext& renderContext)
|
||||
// Submit draw call
|
||||
mesh->GetDrawCallGeometry(drawCall);
|
||||
drawCall.Material = material;
|
||||
drawCall.WorldDeterminantSign = Math::FloatSelect(worldDeterminantSign * instance.RotDeterminant, 1, -1);
|
||||
renderContext.List->AddDrawCall(renderContext, drawModes, _staticFlags, drawCall, entry.ReceiveDecals);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,6 +361,7 @@ void StaticModel::Draw(RenderContext& renderContext)
|
||||
draw.ForcedLOD = _forcedLod;
|
||||
draw.SortOrder = _sortOrder;
|
||||
draw.VertexColors = _vertexColorsCount ? _vertexColorsBuffer : nullptr;
|
||||
draw.SetStencilValue(_layer);
|
||||
#if USE_EDITOR
|
||||
if (HasStaticFlag(StaticFlags::Lightmap))
|
||||
draw.LightmapScale = _scaleInLightmap;
|
||||
@@ -397,6 +398,7 @@ void StaticModel::Draw(RenderContextBatch& renderContextBatch)
|
||||
draw.ForcedLOD = _forcedLod;
|
||||
draw.SortOrder = _sortOrder;
|
||||
draw.VertexColors = _vertexColorsCount ? _vertexColorsBuffer : nullptr;
|
||||
draw.SetStencilValue(_layer);
|
||||
#if USE_EDITOR
|
||||
if (HasStaticFlag(StaticFlags::Lightmap))
|
||||
draw.LightmapScale = _scaleInLightmap;
|
||||
|
||||
Reference in New Issue
Block a user