4 using System.Collections.Generic;
6 using SiliconStudio.Paradox.DataModel;
7 using SiliconStudio.Paradox.Effects.Data;
8 using SiliconStudio.Paradox.Effects.Modules;
9 using SiliconStudio.Paradox;
10 using SiliconStudio.Paradox.Graphics;
11 using SiliconStudio.Core;
12 using SiliconStudio.Core.Mathematics;
13 using SiliconStudio.Paradox.Shaders;
17 namespace SiliconStudio.
Paradox.Effects
24 private EffectOld slideShowEffect;
33 Parameters.RegisterParameter(TexturingKeys.Texture0);
34 Parameters.RegisterParameter(TexturingKeys.Texture2);
35 Parameters.RegisterParameter(PostEffectTransitionKeys.ColorFactorFrom);
36 Parameters.RegisterParameter(PostEffectTransitionKeys.ColorFactorTo);
37 Parameters.RegisterParameter(PostEffectTransitionKeys.TransitionFactor);
38 Parameters.RegisterParameter(PostEffectTransitionKeys.ZoomFactor);
40 TransitionFactor = 0.0f;
42 ColorFactorFrom = Color.White;
43 ColorFactorTo = Color.White;
54 return Parameters.Get(TexturingKeys.Texture0);
58 Parameters.Set(TexturingKeys.Texture0, value);
66 return Parameters.Get(TexturingKeys.Texture2);
70 Parameters.Set(TexturingKeys.Texture2, value);
74 public Color ColorFactorFrom
78 return (
Color)Parameters.Get(PostEffectTransitionKeys.ColorFactorFrom);
82 Parameters.Set(PostEffectTransitionKeys.ColorFactorFrom, value.ToVector4());
86 public Color ColorFactorTo
90 return (
Color)Parameters.Get(PostEffectTransitionKeys.ColorFactorTo);
94 Parameters.Set(PostEffectTransitionKeys.ColorFactorTo, value.ToVector4());
98 public float TransitionFactor
102 return Parameters.Get(PostEffectTransitionKeys.TransitionFactor);
106 Parameters.Set(PostEffectTransitionKeys.TransitionFactor, value);
110 public float ZoomFactor
114 return Parameters.Get(PostEffectTransitionKeys.ZoomFactor);
118 Parameters.Set(PostEffectTransitionKeys.ZoomFactor, value);
126 slideShowEffect = this.EffectSystemOld.BuildEffect(
"SlideShow")
129 .InstantiatePermutation();
131 if (OfflineCompilation)
134 RenderPass.StartPass += (context) =>
139 context.GraphicsDevice.SetViewport(MainTargetPlugin.Viewport);
146 RenderPass.EndPass += (context) =>
150 context.GraphicsDevice.UnsetRenderTargets();
164 var quadData =
new Mesh();
169 VertexBuffers =
new[]
174 var textureMesh =
new EffectMesh(slideShowEffect, quadData).KeepAliveBy(
this);
175 textureMesh.Parameters.Set(EffectPlugin.DepthStencilStateKey, GraphicsDevice.DepthStencilStates.None);
177 textureMesh.Parameters.AddSources(this.Parameters);
178 RenderSystem.GlobalMeshes.AddMesh(textureMesh);
bool Enabled
Gets or sets a value indicating whether this RenderPass is enabled for collection.
The layout of a vertex buffer with a set of VertexElement.
SiliconStudio.Paradox.Graphics.Buffer Buffer
Represents a two dimensional mathematical vector.
A renderable texture view.
Basic shader plugin built directly from shader source file.
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.
SlideShowPlugin(string name)
Represents a 32-bit color (4 bytes) in the form of RGBA (in byte order: R, G, B, A).
Plugin used for the main rendering view.
static VertexElement Position(PixelFormat format, int offsetInBytes=AppendAligned)
Declares a VertexElement with the semantic "POSITION".
A Texture 2D frontend to SharpDX.Direct3D11.Texture2D.
Level10 render pass using a depth buffer and a render target.
PrimitiveType
Defines how vertex data is ordered.
RenderPass is a hierarchy that defines how to collect and render meshes.
A description of a single element for the input-assembler stage. This structure is related to Direct3...
A shader class used for mixin.
Binding structure that specifies a vertex buffer and other per-vertex parameters (such as offset and ...