2 using System.Collections.Generic;
3 using SiliconStudio.Core.Mathematics;
4 using SiliconStudio.Paradox.Effects.Data;
5 using SiliconStudio.Paradox.Effects.Modules;
6 using SiliconStudio.Paradox.Graphics;
7 using SiliconStudio.Paradox.Shaders;
11 namespace SiliconStudio.
Paradox.Effects
25 DefaultShaderPass.Shader.Mixins.Add(postEffect);
33 Effect.PrepareMesh += SetupMeshResources;
36 void SetupMeshResources(EffectOld effect, EffectMesh effectMesh)
48 effectMesh.MeshData.Draw =
new MeshDraw
59 var previousRender = effectMesh.Render;
60 effectMesh.Render += (threadContext) =>
63 var renderTarget = effectMesh.Parameters.Get(RenderTargetKeys.RenderTarget);
64 var desc = renderTarget.Description;
65 threadContext.GraphicsDevice.SetViewport(
new Viewport(0, 0, desc.Width, desc.Height));
66 threadContext.GraphicsDevice.SetRenderTarget(renderTarget);
69 previousRender.Invoke(threadContext);
72 threadContext.GraphicsDevice.UnsetRenderTargets();
override void SetupShaders(EffectMesh effectMesh)
The layout of a vertex buffer with a set of VertexElement.
Represents a two dimensional mathematical vector.
All-in-One Buffer class linked SharpDX.Direct3D11.Buffer.
Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders. See The+GraphicsDevice+class to learn more about the class.
static Buffer New(GraphicsDevice device, BufferDescription description, PixelFormat viewFormat=PixelFormat.None)
Creates a new Buffer instance.
Defines the window dimensions of a render-target surface onto which a 3D volume projects.
static VertexElement Position(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "POSITION".
PrimitiveType
Defines how vertex data is ordered.
A description of a single element for the input-assembler stage. This structure is related to Direct3...
SiliconStudio.Paradox.Graphics.Buffer Buffer
override void SetupResources(EffectMesh effectMesh)
A shader class used for mixin.
Binding structure that specifies a vertex buffer and other per-vertex parameters (such as offset and ...