Class EngineShaderParameters
This class is responsible to provide data that is automatically linked to a constant buffer.
Inherited Members
Namespace: Evergine.Framework.Graphics.Effects
Assembly: Evergine.Framework.dll
Syntax
public class EngineShaderParameters : DisposableObject, IDisposable, IEngineShaderParameters
  Constructors
EngineShaderParameters(DrawContext)
Initializes a new instance of the EngineShaderParameters class.
Declaration
public EngineShaderParameters(DrawContext drawContext)
  Parameters
| Type | Name | Description | 
|---|---|---|
| DrawContext | drawContext | The draw context.  | 
      
Fields
DrawContext
The associated draw context.
Declaration
public readonly DrawContext DrawContext
  Field Value
| Type | Description | 
|---|---|
| DrawContext | 
FlipYProjection
Indicates if the framebuffer require flip the projection.
Declaration
public bool FlipYProjection
  Field Value
| Type | Description | 
|---|---|
| bool | 
Properties
CameraAperture
Gets the camera aperture.
Declaration
public float CameraAperture { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
CameraExposure
Gets the camera exposure.
Declaration
public float CameraExposure { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
CameraFarPlane
Gets the far plane of the camera.
Declaration
public float CameraFarPlane { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
CameraFocalDistance
Gets the camera focal distance (used with DoF).
Declaration
public float CameraFocalDistance { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
CameraFocalLength
Gets the camera focal length.
Declaration
public float CameraFocalLength { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
CameraForward
Gets the forward component of the camera orientation.
Declaration
public Vector3 CameraForward { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
CameraJitter
Gets the current frame camera jittering.
Declaration
public Vector2 CameraJitter { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector2 | 
CameraNearPlane
Gets the near plane of the camera.
Declaration
public float CameraNearPlane { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
CameraPosition
Gets the position value of the current camera.
Declaration
public Vector3 CameraPosition { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
CameraPreviousJitter
Gets the previous frame camera jittering.
Declaration
public Vector2 CameraPreviousJitter { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector2 | 
CameraRight
Gets the right component of the camera orientation.
Declaration
public Vector3 CameraRight { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
CameraUp
Gets the up component of the camera orientation.
Declaration
public Vector3 CameraUp { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
DrawContextID
Gets drawcontext ID.
Declaration
public int DrawContextID { get; }
  Property Value
| Type | Description | 
|---|---|
| int | 
DrawContextViewIndex
Gets the view index of this draw context. A draw context can contains several views (cascade shadow, point light shadows, reflection probe, etc...).
Declaration
public int DrawContextViewIndex { get; }
  Property Value
| Type | Description | 
|---|---|
| int | 
EV100
Gets the Exposition Value at ISO 100.
Declaration
public float EV100 { get; set; }
  Property Value
| Type | Description | 
|---|---|
| float | 
Exposure
Gets the camera exposure.
Declaration
public float Exposure { get; set; }
  Property Value
| Type | Description | 
|---|---|
| float | 
ForwardLightMask
Gets the lighting mask, used in Forward passes.
Declaration
public ulong ForwardLightMask { get; set; }
  Property Value
| Type | Description | 
|---|---|
| ulong | 
FrameID
Gets Frame ID.
Declaration
public long FrameID { get; }
  Property Value
| Type | Description | 
|---|---|
| long | 
IBLLuminance
Gets the IBL luminance.
Declaration
public float IBLLuminance { get; set; }
  Property Value
| Type | Description | 
|---|---|
| float | 
IBLMipMapLevel
Gets the IBL texture mipmap level.
Declaration
public uint IBLMipMapLevel { get; set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
IrradianceSHBufferSize
Gets the irradiance spherical harmonics buffer size.
Declaration
public uint IrradianceSHBufferSize { get; set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
IrradianceSHPtr
Gets the irradiance spherical harmonics buffer ptr.
Declaration
public IntPtr IrradianceSHPtr { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IntPtr | 
LightBufferPtr
Gets the light buffer ptr.
Declaration
public IntPtr LightBufferPtr { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IntPtr | 
LightBufferSize
Gets the light buffer size.
Declaration
public uint LightBufferSize { get; set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
LightCount
Gets the number of lights.
Declaration
public uint LightCount { get; set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
MultiviewCount
Gets the number of eyes to be rendered.
Declaration
public int MultiviewCount { get; }
  Property Value
| Type | Description | 
|---|---|
| int | 
MultiviewPosition
Gets the stereo camera view.
Declaration
public Vector4[] MultiviewPosition { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector4[] | 
MultiviewProjection
Gets the stereo camera projection.
Declaration
public Matrix4x4[] MultiviewProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4[] | 
MultiviewView
Gets the stereo camera view.
Declaration
public Matrix4x4[] MultiviewView { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4[] | 
MultiviewViewProjection
Gets the stereo camera view projection.
Declaration
public Matrix4x4[] MultiviewViewProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4[] | 
MultiviewViewProjectionInverse
Gets the stereo camera view projection.
Declaration
public Matrix4x4[] MultiviewViewProjectionInverse { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4[] | 
PreviousViewProjection
Gets the view projection value of the current camera in the previous frame.
Declaration
public Matrix4x4 PreviousViewProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
Projection
Gets the projection value of the current camera.
Declaration
public Matrix4x4 Projection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
ProjectionInverse
Gets the projection inverse value of the current camera.
Declaration
public Matrix4x4 ProjectionInverse { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
ShadowViewProjectionBufferPtr
Gets the shadow view projection buffer pointer.
Declaration
public IntPtr ShadowViewProjectionBufferPtr { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IntPtr | 
ShadowViewProjectionBufferSize
Gets the shadow view projection buffer size.
Declaration
public uint ShadowViewProjectionBufferSize { get; set; }
  Property Value
| Type | Description | 
|---|---|
| uint | 
SkyboxTransform
Gets the skybox transform.
Declaration
public Matrix4x4 SkyboxTransform { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
SunColor
Gets the sun color.
Declaration
public Vector3 SunColor { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
SunDirection
Gets the sun direction.
Declaration
public Vector3 SunDirection { get; }
  Property Value
| Type | Description | 
|---|---|
| Vector3 | 
SunIntensity
Gets the sun intensity.
Declaration
public float SunIntensity { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
Time
Gets the time value since the game has started.
Declaration
public float Time { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
UnjitteredProjection
Gets the unjittered projection value of the current camera.
Declaration
public Matrix4x4 UnjitteredProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
UnjitteredViewProjection
Gets the unjittered view projection value of the current camera.
Declaration
public Matrix4x4 UnjitteredViewProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
UnjitteredWorldViewProjection
Gets the unjittered (TAA) world view projection value of the current camera and mesh.
Declaration
public Matrix4x4 UnjitteredWorldViewProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
View
Gets the view value of the current camera.
Declaration
public Matrix4x4 View { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
ViewInverse
Gets the view inverse value of the current camera.
Declaration
public Matrix4x4 ViewInverse { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
ViewProjection
Gets the view projection value of the current camera.
Declaration
public Matrix4x4 ViewProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
ViewProjectionInverse
Gets the inverse of the view projection value of the current camera.
Declaration
public Matrix4x4 ViewProjectionInverse { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
World
Gets the world value of the current render mesh.
Declaration
public Matrix4x4 World { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
WorldInverse
Gets the inverse world value of the current render mesh.
Declaration
public Matrix4x4 WorldInverse { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
WorldInverseTranspose
Gets the world inverse transpose of the current mesh.
Declaration
public Matrix4x4 WorldInverseTranspose { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
WorldViewProjection
Gets the world view projection value of the current camera and mesh.
Declaration
public Matrix4x4 WorldViewProjection { get; }
  Property Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
Methods
Destroy()
Destroy all resources of this instance.
Declaration
protected override void Destroy()
  Overrides
GetTexture(TextureSemantic, int)
Gets the texture semantic and texture index.
Declaration
public Texture GetTexture(TextureInfo.TextureSemantic textureSemantic, int textureIndex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TextureInfo.TextureSemantic | textureSemantic | Texture semantic.  | 
      
| int | textureIndex | Texture index.  | 
      
Returns
| Type | Description | 
|---|---|
| Texture | Framebuffer texture.  |