DXScene Properties |
The DXScene type exposes the following members.
Name | Description | |
---|---|---|
BackBuffer | Gets the BackBuffer as Texture2D | |
BackBufferDescription | Gets the Description of the BackBuffer | |
BackBufferRenderTargetView | Gets the RenderTargetView of the BackBuffer | |
BackBufferShaderResourceView | ShaderResourceView that is created from BackBuffer. Created when DXScene is initialized with CreateBackBufferShaderResourceView property set to true and when swap chain is not used. The created ShaderResourceView can be used in another DXScene so that the renderer 3D scene can be used as a texture. This works only when both DXScenes are created by the same DXDevice. | |
BackgroundColor | Gets or sets a Color4 that represents a background color for the scene. The color values must be alpha premultiplied - each red, green and blue value must be multiplied with alpha value (for example a fully transparent value is (0, 0, 0, 0) and not (0, 255, 255, 255) as in WPF. | |
BackgroundRenderingQueue | Gets a RenderingQueue that is rendered first. Objects in this queue are not sorted and are rendered in the same order as they are added to the queue. | |
BackgroundThreadsManager | Gets or sets a BackgroundThreadsManager that is used instead of BackgroundThreadsManager defined in DXDevice. | |
BackgroundWaitingUntilRenderedThresholdTimeMs | Time in milliseconds that is used to enable background waiting until rendered. When DXViewportView.IsWaitingInBackgroundUntilRendered is true and after waiting for rendered in the last two frames is bigger then this time, then waiting is actually enabled (this prevents using background thread for simple scenes). Default value is 3 milliseconds. | |
BuffersInitialized | Gets a Boolean that specifis if SwapChain and buffers are created. This property can be false when DXScene is initialized with zero width and height. | |
Camera | Gets or sets an ICamera that is used to show the scene. | |
ComplexGeometryRenderingQueue | Gets a RenderingQueue that contains opaque and very complex 3D objects that are expected to take a lot of GPU time to render and should therefore start rendering as soon as possible. Usually this queue contains instanced objects, big point cloud objects or standard objects with many triangles. Objects in this queue are not sorted and are rendered in the main thread (no multi-threading rendering) and in the same order as they are added to the queue. | |
CreateBackBufferShaderResourceView | When true and when swap chain is not used, then a BackBufferShaderResourceView is created from BackBuffer. Default value is false. | |
DefaultCompleteRenderingStep | Gets a default CompleteRenderingStep. | |
DefaultInitializeRenderingStep | Gets a default InitializeRenderingStep. | |
DefaultPreparePostProcessingRenderingStep | Gets a default PreparePostProcessingRenderingStep. This rendering step is defined in the DefaultRenderPostProcessingRenderingStepsGroup. | |
DefaultPrepareRenderTargetsRenderingStep | Gets a default PrepareRenderTargetsRenderingStep. | |
DefaultRenderObjectsRenderingStep | Gets a default RenderObjectsRenderingStep. | |
DefaultRenderPostProcessingRenderingStep | Gets a default RenderPostProcessingRenderingStep. This rendering step is defined in the DefaultRenderPostProcessingRenderingStepsGroup. | |
DefaultRenderPostProcessingRenderingStepsGroup | Gets a default RenderingStepsGroup that groups PreparePostProcessing and RenderPostProcessing rendering steps. | |
DefaultRenderSpritesRenderingStep | Gets a default RenderSpritesRenderingStep. This step is added to the RenderingSteps before the DefaultCompleteRenderingStep after the first SpriteBatch is created. The step is removed when the last SpriteBatch is removed from DXScene. | |
DefaultResolveBackBufferRenderingStep | Gets a default ResolveBackBufferRenderingStep. | |
DepthStencilBufferFormat | Gets or sets a depth stencil buffer format that is used in rendering the scene. Default value is D32_Float (32 bit depth buffer, no stencil buffer). If this value is changed, a new depth stencil buffer will be created in the next call to PrepareRenderTargetsRenderingStep. | |
DepthStencilView | Gets the DepthStencilView | |
Device | Gets a DirectX device that is used by this DXScene. | |
DpiScaleX | Gets or sets a float that represents a DPI scale factor in X direction: 1 means 96 DPI, 1.5 means 144 DPI, etc. This value is used in line and pixel rendering and scales the line thickness or size of pixels. | |
DpiScaleY | Gets or sets a float that represents a DPI scale factor in Y direction: 1 means 96 DPI, 1.5 means 144 DPI, etc. This value is used in line and pixel rendering and scales the line thickness or size of pixels. | |
DXDevice | Gets a DXDevice that was used to initialize this DXScene. | |
DXHitTestOptions | DXHitTestOptions specifies hit testing parameters that are used with DXScene's hit testing. | |
ExecutePixelShaderPerSample | Obsolete. ExecutePixelShaderPerSample is obsolete. Use SupersamplingCount instead. | |
ForegroundRenderingQueue | Gets a RenderingQueue that is rendered after standard GeometryRenderingQueue but before TransparentRenderingQueue. Objects in this queue are not sorted and are rendered in the same order as they are added to the queue. | |
FrameNumber | Gets an integer that represents the last rendered frame number (increased after each rendered frame) | |
GeometryRenderingQueue | Obsolete. OBSOLETE: GeometryRenderingQueue is obsolete because it was slit into ComplexGeometryRenderingQueue, LineGeometryRenderingQueue, OtherGeometryRenderingQueue and StandardGeometryRenderingQueue. Please add your objects to any of those RenderingQueues. For Backwards compatibility the GeometryRenderingQueue is assigned to the OtherGeometryRenderingQueue. | |
HardwareAccelerate3DLineCaps | Gets or sets a Boolean that specifies if line caps (arrow, box, diamond, etc.) are hardware accelerated and generated on the graphics card. Default value is true. When false, then lines with caps will be generated on the CPU by Ab3d.PowerToys library. | |
HardwareAccelerate3DLines | Gets or sets a boolean that specifies if rendering 3D lines is hardware accelerated by DXEngine. | |
Height | Gets an integer that represents a height of the Viewport | |
IsAutomaticallyUpdatingBeforeEachRender | Gets or sets a Boolean that specifies if Update method is automatically called before each rendering of the scene (if it was not yet manually called). Default value is true. | |
IsCachingCommandLists | Gets or sets a Boolean that specifies if Ab3d.DXEngine records all DirectX commands into DirectX CommandLists and reuses the command lists on next frame if only camera and light properties have changed. See remarks for more info. Default value is false. | |
IsCreatingFinalBackBufferCopy | When true and when UseSharedWpfTexture is true, then the FinalBackBuffer is copied to FinalBackBufferCopy in the CompleteRenderingStep. Default value is true for hardware devices. | |
IsCurrentlyWaitingUntilRendered | Gets a Boolean that specifies if the background thread is currently waiting to complete rendering (this can be used for DirectXImage PresentationType where the DXEngine needs to notify WPF when the 3D scene is rendered; this is enabled by default - the DXViewportView.IsWaitingInBackgroundUntilRendered is set to true). When this property is true, then a new render pass should not begin (by default the InitializeRenderingStep is waiting on the main thread until the rendering is completed). | |
IsEnabled | Gets or sets if this DXScene is enabled and is rendering the scene. This value can be set to true only after this DXScene has a valid size and the back-buffers were initialized. | |
IsInitialized | Gets a Boolean that is set to true when this DXScene is initialized - DXDevice are created and also required objects and collections are created: RenderingContext, RenderingQueues, PostProcessing. Also the SwapChain is created when the DXScene in initialized with InitializeSwapChain method (though the size of SwapChain buffers might not be final yet). Note that when IsInitialized is set to true, the DirectX buffers are initialized only when the size of viewport is already known. To see if buffers are initialized check the BuffersInitialized property. | |
IsMaterialSortingEnabled | Gets or sets a Boolean that specified if sorting objects by their materials is enabled. Sorting objects usually improves rendering performance because objects with same materials are rendered one after another and this reduces the required DirectX state changes. Objects are sorted by their material hash value only when they are in the MaterialSortedRenderingQueue (usually all standard and opaque geometry objects). But sometimes user wants to have full control of the order in which the objects are sorted. In this case it is possible to disable material sorting. Default value is true. | |
IsRendering | Returns true when DXScene is currently executing object rendering (is inside RenderScene method). This property can be checked from a background thread. | |
IsSwapChainCreated | Gets a Boolean that specifis if DXScene will be using SwapChain to render the scene and if SwapChain is already created. | |
IsTransparencySortingEnabled | Gets or sets a Boolean that specifies if sorting transparent objects by their distance to the camera is enabled. Default value is false. See remarks for more info. | |
IsWaitingUntilRenderedEnabled | Gets a Boolean that specifies if the background waiting until rendered is enabled (when using DirectXImage presentation type, when DXViewportView.IsWaitingInBackgroundUntilRendered is true and when two consecutive frames took longer then BackgroundWaitingUntilRenderedThresholdTimeMs). | |
Lights | Gets a list of lights that are used in this DXScene. | |
LineGeometryRenderingQueue | Gets a RenderingQueue that contains opaque and single-colored 3D line objects that are rendered with ThickLineEffect. Objects in this queue are not sorted but are rendered with using multi-threading. | |
MasterDXScene | Gets a DXScene that is set when this DXScene is rendered a 3D scene that is defined in a MasterDXScene. | |
MaxBackgroundThreadsCount | Gets or sets an integer that specifies the maximum number of background threads that can be used for multi-threaded operations. Value 0 means that no background thread will be used and that all rendering will be performed on the main thread. Value 4 means that besides the main thread up to four additional background threads can be used for rendering. The actually used number of threads can be lower if there is not a lot of objects to render. Default value is set to Environment.ProcessorCount minus 1 but 7 is the maximum value. See remarks for more info. | |
MaxFarPlaneDistance | When MaxFarPlaneDistance is set to any positive value and OptimizeNearAndFarCameraPlanes is true, the calculated far plane distance is never bigger then the specified value. This value must be bigger then MinNearPlaneDistance or its value is not used. Default value is NaN. | |
MinNearPlaneDistance | When MinNearPlaneDistance is set to any positive value and OptimizeNearAndFarCameraPlanes is true, the calculated near plane distance is never smaller than the specified value. Default value is NaN. | |
MSAABackBuffer | Gets the MSAA BackBuffer as Texture2D (set if multisampling is used) | |
MSAABackBufferDescription | Gets the Description of the MSAABackBuffer | |
MSAABackBufferRenderTargetView | Get the RenderTargetView of the MSAA BackBuffer | |
MultisampleCount | Gets an integer that represents a used multisample count (used for anti-aliasing) | |
OptimizeNearAndFarCameraPlanes | Gets or sets a boolean that specify if NearPlaneDistance and FarPlaneDistance are automatically set by scene bounds (true by default). This can prevent z-fighting problems. If you want that NearPlaneDistance and FarPlaneDistance are set manually, this property must be set to false. | |
OtherGeometryRenderingQueue | Gets a RenderingQueue that contains opaque objects that cannot be rendered with StandardEffect. Usually this queue contains pixels, objects with physically based rendering material and other objects with non-standard effect (for example vertex colored materials). The objects in this queue are not rendered with using multi-threading. Objects in this queue are sorted so that they are grouped by material to minimize state changes. | |
OverlayRenderingQueue | Gets a RenderingQueue that is rendered last. Objects in this queue are not sorted and are rendered in the same order as they are added to the queue. | |
PostProcesses | Gets a collection of post processes that will be applied after rendering the 3D scene. | |
RenderAntialiased3DLines | When false and UseGeometryShaderFor3DLines is also false, the 3D lines are rendered without antialiasing them. This greatly improves rendering performance. Default value is true. | |
RenderConnectedLinesAsDisconnected | Gets or sets a boolean that specifies if all connected 3D lines (polylines, line arc, rectangle, etc.) are rendered as disconnected 3D lines (separate lines). Default value is false. | |
RenderConnectedLinesAsDisconnectedLinesThicknessLimit | Obsolete. Gets or sets the LineThickness value that will limit rendering connected 3D lines (polylines, line arc, rectangle, etc.), as disconnected 3D lines (fully hardware accelerated). The connected 3D lines that have lower or equal LineThickness then the value of this property will be rendered as disconnected 3D line; other connected lines will still be generated on the CPU by Ab3d.PowerToys library. Default value is 3. | |
RenderingContext | Gets the RenderingContext that defines the context information that are used during scene rendering. | |
RenderingQueues | RenderingQueues is a read only collection of rendering queues that represent queues of low lever objects that are prepared to be rendered with DirectX. RenderingQueue are rendered in the same order as in the RenderingQueues list. The rendering is done in the RenderObjectsRenderingStep rendering step. | |
RenderingSteps | Gets a RenderingStepsList that represents the rendering steps that are executed to render the 3D scene. | |
RenderMultiPolyLinesWithOneDrawCall | When true (by default) then multiple poly-lines can be rendered with one draw call (one ScreenSpaceLineNode is created). When false, then for each poly-line one ScreenSpaceLineNode is create and this renders each line with its own draw call. | |
RootNode | Gets or sets a root SceneNode - the first in the hierarchy. | |
ShaderQuality | Gets or sets a quality settings that specifies the type of shader that should be used to render the scene. If DXScene is used with DXViewportView, then this value is set from used GraphicsProfile. NOTE: Changing this property after the DXDevice is initialized will have no effect. | |
ShadowRenderingProvider | Obsolete. ShadowRenderingProvider property is obsolete because it is possible to use multiple shadow rendering providers. Use GetShadowRenderingProviders method to get an array of shadow rendering providers. This methods still returns the first shadow rendering provider, but when multiple providers are initialized, the GetShaderBytecodeProviders method needs to be used. | |
SSAABackBuffer | Gets the super-sampled BackBuffer as Texture2D (set if super-sampling is used) | |
SSAABackBufferDescription | Gets the Description of the super-sampled BackBuffer | |
SSAABackBufferRenderTargetView | Get the RenderTargetView of the super-sampled BackBuffer | |
SSAABackBufferShaderResourceView | Get the ShaderResourceView of the super-sampled BackBuffer | |
SSAONormalDepthShaderResourceView | Get the ShaderResourceView of the normal-depth buffer for SSAO rendering. The difference between standard normal-depth buffer and SSAO normal-depth buffer is that in the later normals in this buffer are also transformed by the view matrix. The format of the buffer is R16G16B16A16_Float. This property is set when ScreenSpaceAmbientOcclusionRenderingProvider is initialized by calling InitializeShadowRendering(ShadowRenderingProviderBase) method. | |
SSAOShadowMapShaderResourceView | Get the ShaderResourceView of the SSAO shadow map. The format of the buffer is R16_UNorm. This property is set when ScreenSpaceAmbientOcclusionRenderingProvider is initialized by calling InitializeShadowRendering(ShadowRenderingProviderBase) method. | |
StagingBackBuffer | Gets the StagingBackBuffer that is used when the final rendered image needs to be copied to main memory. This can be done only from staging buffer. When final render image in not copied to main memory the StagingBackBuffer is null. | |
StagingBackBufferDescription | Gets the Description of the StagingBackBuffer | |
StandardGeometryRenderingQueue | Gets a RenderingQueue that contains standard opaque objects that can be rendered with StandardEffect (all objects with StandardMaterial or objects that are created from WPF 3D objects). Objects in this queue are sorted so that they are grouped by material to minimize state changes and are also rendered with using multi-threading. | |
Statistics | Gets RenderingStatistics class that contains various rendering statistics. Statistics is collected only when IsCollectingStatistics is set to true. | |
SupersamplingCount | Gets the super-sampling count that describes how much more pixels are rendered for each final pixel. The rendering is done on a scaled texture that is bigger for the amount specified by SupersamplingCount. At the end of rendering this texture is down-sampled into the texture with the final size. Valid values are from 1 (no super-sampling) to 64. Value 4 means that width and height are multiplied by 2 and this produces a texture with 4 times as many pixels. Value 2 means that width and height are multiplied by 1.41 (sqrt(2) = 1.41) and this produces a texture with 2 times as many pixels. | |
SupersamplingFactor | Gets the factor by which width and height are multiplied because of the SupersamplingCount. | |
SwapChain | Gets the SwapChain or null if SwapChain is not used. | |
TransparentRenderingQueue | Gets a RenderingQueue that contains transparent objects. Objects in this queue are sorted by their distance to the camera - farthest objects are rendered first. | |
UsedMultisamplingDescription | Gets a SampleDescription that describes what level of multisampling is used by the current DXScene. Multisampling is used to create antialiased images with rendering the multiple samples of the same pixel. | |
UsedSwapChainEffect | Gets the SwapEffect that was used to create the SwapChain. | |
UseGeometryShaderFor3DLines | Gets or sets a boolean that specifies if 3D lines are rendered with using GeometryShader that can create thick lines. If false, then all 3D lines will be rendered as simple DirectX lines with thickness 1. Default value is true. | |
UseSharedWpfTexture | Gets or sets a nullable Boolean that is used only when using BackBuffer without SwapChain and specifies if DXScene is using a shared resources (texture) that can be used by both DirectX 11 (DXEngine) and DirectX 9 (WPF). Using shared resources improves performance because the texture that is used to render the DirectX 11 image is shader with WPF composition engine. This means that the texture is not copied to main CPU memory and than back to GPU by WPF. When the value is not set by the user (is null), then the value is set in the DXScene initialization. It is set to true when DXEngine is using the same graphics card (adapter) then WPF. Otherwise the value is set to false. | |
Viewport | Gets or sets a Viewport that defines the area where the scene will be rendered. | |
VirtualRealityProvider | Gets a virtual reality provider that is currently used by this DXScene. This property can be set by calling InitializeVirtualRealityRendering(VirtualRealityProviderBase) method. | |
Width | Gets an integer that represents a width of the Viewport |