CustomDepth stencil 2 on spline meshes, SplineNetwork rebuild, PP occluded (disabled)
- Enable RenderCustomDepth + stencil value 2 on spline tube mesh - Restore stencil 2 on deselect (selection sets stencil 1 for outline) - Auto-generated M_PS_Editor_SplineOccluded PP material (stencil + depth compare) - PP occluded effect disabled for now (depth comparison unreliable) - AISpline triggers SplineNetwork::RebuildNetwork on BeginPlay (next tick) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,8 @@ APS_BehaviorEditor_AISpline::APS_BehaviorEditor_AISpline()
|
||||
SplineMeshComp->SetCollisionResponseToChannel(ECC_Camera, ECR_Block);
|
||||
SplineMeshComp->bUseComplexAsSimpleCollision = true;
|
||||
SplineMeshComp->SetCastShadow(false);
|
||||
SplineMeshComp->SetRenderCustomDepth(true);
|
||||
SplineMeshComp->SetCustomDepthStencilValue(2);
|
||||
|
||||
// Handle parent
|
||||
HandleRoot = CreateDefaultSubobject<USceneComponent>(TEXT("HandleRoot"));
|
||||
@@ -386,6 +388,7 @@ void APS_BehaviorEditor_AISpline::SetSelected(bool bSelected)
|
||||
{
|
||||
UMaterialInstanceDynamic* Mat = bSelected ? SplineMatSelected : SplineMat;
|
||||
if (Mat) SplineMeshComp->SetMaterial(0, Mat);
|
||||
SplineMeshComp->SetCustomDepthStencilValue(bSelected ? 1 : 2);
|
||||
}
|
||||
if (CenterCubeMat)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user