Gorgon
Show / Hide Table of Contents

Class Gorgon2DSilhouetteEffect

An effect that renders the silhouette of an image.

Inheritance
object
GorgonNamedObject
Gorgon2DEffect
Gorgon2DSilhouetteEffect
Implements
IGorgonNamedObject
IDisposable
IGorgonGraphicsObject
IGorgon2DCompositorEffect
Inherited Members
Gorgon2DEffect.BatchStateAllocator
Gorgon2DEffect.PixelShaderAllocator
Gorgon2DEffect.VertexShaderAllocator
Gorgon2DEffect.Macros
Gorgon2DEffect.Renderer
Gorgon2DEffect.Graphics
Gorgon2DEffect.PassCount
Gorgon2DEffect.Description
Gorgon2DEffect.CompileShader<T>(string, string)
Gorgon2DEffect.OnBeforeRender(GorgonRenderTargetView, bool)
Gorgon2DEffect.OnAfterRender(GorgonRenderTargetView)
Gorgon2DEffect.OnBeforeRenderPass(int, GorgonRenderTargetView, GorgonCameraCommon)
Gorgon2DEffect.OnAfterRenderPass(int, GorgonRenderTargetView)
Gorgon2DEffect.BeginRender(GorgonRenderTargetView, GorgonBlendState, GorgonDepthStencilState, GorgonRasterState)
Gorgon2DEffect.BeginPass(int, GorgonRenderTargetView, GorgonCameraCommon)
Gorgon2DEffect.EndPass(int, GorgonRenderTargetView)
Gorgon2DEffect.EndRender(GorgonRenderTargetView)
Gorgon2DEffect.Precache()
Gorgon2DEffect.Dispose()
GorgonNamedObject.GetHashCode()
GorgonNamedObject.ToString()
GorgonNamedObject.Name
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Renderers
Assembly: Gorgon.Renderers.Gorgon2D.dll
Syntax
public class Gorgon2DSilhouetteEffect : Gorgon2DEffect, IGorgonNamedObject, IDisposable, IGorgonGraphicsObject, IGorgon2DCompositorEffect
Remarks

This effect renders a silhouette image by using the vertex colors instead of the texture colors, while respecting the alpha of the texture (and vertex).

Constructors

| Edit this page View Source

Gorgon2DSilhouetteEffect(Gorgon2D)

Initializes a new instance of the Gorgon2DSilhouetteEffect class.

Declaration
public Gorgon2DSilhouetteEffect(Gorgon2D renderer)
Parameters
Type Name Description
Gorgon2D renderer

The renderer used to draw the effect.

Methods

| Edit this page View Source

Begin(GorgonBlendState, GorgonDepthStencilState, GorgonRasterState, GorgonCameraCommon)

Function to begin rendering the effect.

Declaration
public void Begin(GorgonBlendState blendState = null, GorgonDepthStencilState depthStencilState = null, GorgonRasterState rasterState = null, GorgonCameraCommon camera = null)
Parameters
Type Name Description
GorgonBlendState blendState

[Optional] A user defined blend state to apply when rendering.

GorgonDepthStencilState depthStencilState

[Optional] A user defined depth/stencil state to apply when rendering.

GorgonRasterState rasterState

[Optional] A user defined rasterizer state to apply when rendering.

GorgonCameraCommon camera

[Optional] The camera to use when rendering.

| Edit this page View Source

Dispose(bool)

Releases unmanaged and - optionally - managed resources

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides
Gorgon2DEffect.Dispose(bool)
| Edit this page View Source

End()

Function to end the effect rendering.

Declaration
public void End()
| Edit this page View Source

OnGetBatchState(int, IGorgon2DEffectBuilders, bool)

Function called to build a new (or return an existing) 2D batch state.

Declaration
protected override Gorgon2DBatchState OnGetBatchState(int passIndex, IGorgon2DEffectBuilders builders, bool statesChanged)
Parameters
Type Name Description
int passIndex

The index of the current rendering pass.

IGorgon2DEffectBuilders builders

The builder types that will manage the state of the effect.

bool statesChanged

true if the blend, raster, or depth/stencil state was changed. false if not.

Returns
Type Description
Gorgon2DBatchState

The 2D batch state.

Overrides
Gorgon2DEffect.OnGetBatchState(int, IGorgon2DEffectBuilders, bool)
| Edit this page View Source

OnInitialize()

Function called to initialize the effect.

Declaration
protected override void OnInitialize()
Overrides
Gorgon2DEffect.OnInitialize()
Remarks

Applications must implement this method to ensure that any required resources are created, and configured for the effect.

| Edit this page View Source

Render(GorgonTexture2DView, GorgonRenderTargetView)

Function to render an effect under the Gorgon2DCompositor.

Declaration
public void Render(GorgonTexture2DView texture, GorgonRenderTargetView output)
Parameters
Type Name Description
GorgonTexture2DView texture

The texture to render into the next target.

GorgonRenderTargetView output

The render target that will receive the final output.

Implements

IGorgonNamedObject
IDisposable
IGorgonGraphicsObject
IGorgon2DCompositorEffect

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author