Show / Hide Table of Contents

Class Lighting

Collection of shader code strings, describing the struct for a Light and different methods for light and shadow calculation.

Inheritance
System.Object
Lighting
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Core.ShaderShards.Fragment
Assembly: Fusee.Engine.Core.dll
Syntax
public static class Lighting

Fields

LightStructDeclaration

Struct, that describes a Light object in the shader code./>

Declaration
public static string LightStructDeclaration
Field Value
Type Description
System.String

Methods

ApplyLightDeferred(Light, Boolean, Int32, Boolean)

Wraps all the lighting methods into a single one. For deferred rendering, this equals the "main" method.

Declaration
public static string ApplyLightDeferred(Light lc, bool isCascaded = false, int numberOfCascades = 0, bool debugCascades = false)
Parameters
Type Name Description
Light lc
System.Boolean isCascaded
System.Int32 numberOfCascades
System.Boolean debugCascades
Returns
Type Description
System.String

ApplyLightForward(ShadingModel)

Wraps all the lighting methods into a single one.

Declaration
public static string ApplyLightForward(ShadingModel setup)
Parameters
Type Name Description
ShadingModel setup
Returns
Type Description
System.String

AssembleLightingMethods(ShadingModel)

Collects all lighting methods, dependent on what is defined in the given ShadingModel and the LightingCalculationMethod.

Declaration
public static string AssembleLightingMethods(ShadingModel setup)
Parameters
Type Name Description
ShadingModel setup

The ShadingModel which is used to decide which lighting methods we need.

Returns
Type Description
System.String

AttenuationConeComponent()

Calculates the cone component of the attenuation of a spot light.

Declaration
public static string AttenuationConeComponent()
Returns
Type Description
System.String

AttenuationPointComponent()

Calculates the attenuation of a point light.

Declaration
public static string AttenuationPointComponent()
Returns
Type Description
System.String

BRDFSpecularComponent()

Method for calculation the specular lighting component. Replaces the standard specular calculation with the Cook-Torrance calculation.

Declaration
public static string BRDFSpecularComponent()
Returns
Type Description
System.String

ColorManagementMethods()

Contains all methods for color management (gamma and from and to sRGB).

Declaration
public static string ColorManagementMethods()
Returns
Type Description
System.String

DecodeSRGB()

Converts a color from sRGB to linear space.

Declaration
public static string DecodeSRGB()
Returns
Type Description
System.String

DisneyDiffuseComponent()

Method for calculation the diffuse lighting component. Replaces the standard diffuse calculation with the one introduced in [Burley 2012, "Physically-Based Shading at Disney"].

Declaration
public static string DisneyDiffuseComponent()
Returns
Type Description
System.String

EDLResponse()

Method for calculating the shading factor for eye dome lighting.

Declaration
public static string EDLResponse()
Returns
Type Description
System.String

EDLShadingFactor()

Method for calculating the eye dome lighting response.

Declaration
public static string EDLShadingFactor()
Returns
Type Description
System.String

EncodeSRGB()

Converts a color from linear space to sRGB.

Declaration
public static string EncodeSRGB()
Returns
Type Description
System.String

GammaCorrection()

Method for gamma correction.

Declaration
public static string GammaCorrection()
Returns
Type Description
System.String

LambertDiffuseComponent()

Method for calculation the diffuse lighting component.

Declaration
public static string LambertDiffuseComponent()
Returns
Type Description
System.String

LinearizeDepth()

Method for linerizing a depth value using the clipping planes of the current camera.

Declaration
public static string LinearizeDepth()
Returns
Type Description
System.String

OrenNayarDiffuseComponent()

Method for calculation the diffuse lighting component. See: http://glslsandbox.com/e#54592.0

Declaration
public static string OrenNayarDiffuseComponent()
Returns
Type Description
System.String

ShadowCalculation()

Creates the method for calculating whether a fragment is in shadow or not, by using a shadow map (sampler2D).

Declaration
public static string ShadowCalculation()
Returns
Type Description
System.String

ShadowCalculationCascaded()

Creates the method for calculating whether a fragment is in shadow or not, by using a shadow map (sampler2D).

Declaration
public static string ShadowCalculationCascaded()
Returns
Type Description
System.String

ShadowCalculationCubeMap()

Creates the method for calculating whether a fragment is in shadow or not, by using a shadow map (sampler2DCube). The cube map is used when calculating the shadows for a point light.

Declaration
public static string ShadowCalculationCubeMap()
Returns
Type Description
System.String

SpecularComponent()

Method for calculation the specular lighting component.

Declaration
public static string SpecularComponent()
Returns
Type Description
System.String
Generated by DocFX
GitHub Repo
Back to top