4 using System.ComponentModel;
6 using SiliconStudio.Core;
7 using SiliconStudio.Core.Serialization.Converters;
8 using SiliconStudio.Paradox.EntityModel;
9 using SiliconStudio.Paradox.Graphics;
11 namespace SiliconStudio.
Paradox.Engine
17 [DataContract(
"CubemapSourceComponent")]
31 InfluenceRadius = 1.0f;
32 InfinityCubemap =
false;
43 textureCube = texture;
53 public bool Enabled {
get; set; }
59 public bool IsDynamic {
get; set; }
66 public int Size {
get; set; }
72 public bool InfinityCubemap {
get; set; }
79 public float InfluenceRadius {
get; set; }
86 public float NearPlane {
get; set; }
92 [DefaultValue(100.0f)]
93 public float FarPlane {
get; set; }
99 [DataMemberCustomSerializer]
109 if (textureCube != null)
110 MaxLod = textureCube.Description.MipLevels - 1;
118 public int MaxLod {
get;
private set; }
144 if (textureCube != null)
146 RenderTarget = textureCube.ToRenderTarget(ViewType.Full, 0, 0);
147 DepthStencil = Texture2D.New(textureCube.GraphicsDevice, Size, Size, PixelFormat.D24_UNorm_S8_UInt, TextureFlags.DepthStencil, 6).ToDepthStencilBuffer(
false);
157 if (textureCube != null)
159 RenderTargets =
new[]
161 textureCube.ToRenderTarget(ViewType.Single, 0, 0),
162 textureCube.ToRenderTarget(
ViewType.Single, 1, 0),
163 textureCube.ToRenderTarget(ViewType.Single, 2, 0),
164 textureCube.ToRenderTarget(
ViewType.Single, 3, 0),
165 textureCube.ToRenderTarget(ViewType.Single, 4, 0),
166 textureCube.ToRenderTarget(
ViewType.Single, 5, 0)
168 DepthStencil = Texture2D.New(textureCube.GraphicsDevice, Size, Size, PixelFormat.D24_UNorm_S8_UInt, TextureFlags.DepthStencil).ToDepthStencilBuffer(
false);
A renderable texture view.
A TextureCube frontend to SharpDX.Direct3D11.Texture2D.
Base class for converters to/from a data type.
Puts a cubemap at the containing entity location. This could be dynamic (runtime rendered) or static ...
CubemapSourceComponent()
Initializes a new instance of the CubemapSourceComponent class.
ViewType
Defines how a view is selected from a resource.
void CreateSingleViewRenderTargets()
Creates single view render targets on demand.
void CreateFullViewRenderTarget()
Creates full view render targets on demand.
A class that represents a tag propety.
CubemapSourceComponent(TextureCube texture)
Base class for texture resources.