Method DoLensFlareDataDrivenCommon
DoLensFlareDataDrivenCommon(Material, Camera, float, float, bool, float, float, bool, Vector3, Matrix4x4, CommandBuffer, bool, bool, Texture, Texture, RenderTargetIdentifier, Func<Light, Camera, Vector3, float>, int, int, int, int, int, int, int, int, int, int, int, int, bool)
Effective Job of drawing the set of Lens Flare registered
Declaration
public static void DoLensFlareDataDrivenCommon(Material lensFlareShader, Camera cam, float actualWidth, float actualHeight, bool usePanini, float paniniDistance, float paniniCropToFit, bool isCameraRelative, Vector3 cameraPositionWS, Matrix4x4 viewProjMatrix, CommandBuffer cmd, bool taaEnabled, bool hasCloudLayer, Texture cloudOpacityTexture, Texture sunOcclusionTexture, RenderTargetIdentifier colorBuffer, Func<Light, Camera, Vector3, float> GetLensFlareLightAttenuation, int _FlareOcclusionRemapTex, int _FlareOcclusionTex, int _FlareOcclusionIndex, int _FlareCloudOpacity, int _FlareSunOcclusionTex, int _FlareTex, int _FlareColorValue, int _FlareData0, int _FlareData1, int _FlareData2, int _FlareData3, int _FlareData4, bool debugView)
Parameters
Type | Name | Description |
---|---|---|
Material | lensFlareShader | Lens Flare material (HDRP or URP shader) |
Camera | cam | Camera |
float | actualWidth | Width actually used for rendering after dynamic resolution and XR is applied. |
float | actualHeight | Height actually used for rendering after dynamic resolution and XR is applied. |
bool | usePanini | Set if use Panani Projection |
float | paniniDistance | Distance used for Panini projection |
float | paniniCropToFit | CropToFit parameter used for Panini projection |
bool | isCameraRelative | Set if camera is relative |
Vector3 | cameraPositionWS | Camera World Space position |
Matrix4x4 | viewProjMatrix | View Projection Matrix of the current camera |
CommandBuffer | cmd | Command Buffer |
bool | taaEnabled | Set if TAA is enabled |
bool | hasCloudLayer | Set if cloudLayerTexture is used |
Texture | cloudOpacityTexture | cloudOpacityTexture used for sky visibility fullscreen |
Texture | sunOcclusionTexture | Sun Occlusion Texture from VolumetricCloud on HDRP or null |
RenderTargetIdentifier | colorBuffer | Source Render Target which contains the Color Buffer |
Func<Light, Camera, Vector3, float> | GetLensFlareLightAttenuation | Delegate to which return return the Attenuation of the light based on their shape which uses the functions ShapeAttenuation...(...), must reimplemented per SRP |
int | _FlareOcclusionRemapTex | ShaderID for the OcclusionRemap |
int | _FlareOcclusionTex | ShaderID for the FlareOcclusionTex |
int | _FlareOcclusionIndex | ShaderID for the FlareOcclusionIndex |
int | _FlareCloudOpacity | ShaderID for the FlareCloudOpacity |
int | _FlareSunOcclusionTex | ShaderID for the _FlareSunOcclusionTex |
int | _FlareTex | ShaderID for the FlareTex |
int | _FlareColorValue | ShaderID for the FlareColor |
int | _FlareData0 | ShaderID for the FlareData0 |
int | _FlareData1 | ShaderID for the FlareData1 |
int | _FlareData2 | ShaderID for the FlareData2 |
int | _FlareData3 | ShaderID for the FlareData3 |
int | _FlareData4 | ShaderID for the FlareData4 |
bool | debugView | Debug View which setup black background to see only Lens Flare |