Vixen
02b45cc4
csharp
public sealed class OutlineRenderer

Outlines from depth and normal discontinuities — the editor's selection highlight, and the stylised look that goes with cel shading.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Screen space rather than geometry: the alternative is drawing every silhouette edge as a second pass over the mesh, which needs adjacency data the importer would have to build and scales with the scene rather than with the screen. What it cannot do is outline something hidden behind something else, which is exactly what a selection outline usually wants — hence the mask.

Fields and properties (11)

  • public required string Source

    The colour it draws over.

  • public required string Depth

    The depth it finds silhouettes in.

  • public string Normals

    The normals it finds creases in.

  • public string SelectionMask

    A mask of what is selected, for an outline around one object.

  • public bool UseNormals

    Whether creases inside a silhouette are outlined too.

  • public bool SelectionOnly

    Whether only the masked object is outlined.

  • public Vector4 Colour

    The outline's colour.

  • public float Thickness

    How wide it is, in pixels.

  • public float NearPlane

    The camera's near plane, for turning depth back into distance.

  • public float FarPlane

    The camera's far plane.

  • public float DepthThreshold

    How much depth has to change across a pixel to count as an edge.

Methods (2)

  • public OutlineRenderer()

    Outlines from depth and normal discontinuities — the editor's selection highlight, and the stylised look that goes with cel shading.

  • protected override void Configure(CompositorFrame frame, ParameterCollection parameters, IList<ResourceBinding> bindings)

    Fills in this frame's parameters and bindings.

Used by (2)

  • PostEffectFactoryVixen.Rendering.PostFx
  • PostEffectTestsVixen.Rendering.PostFx.Tests