Method DoLensFlareScreenSpaceCommon
DoLensFlareScreenSpaceCommon(Material, Camera, float, float, Color, Texture, Texture, Texture, Texture, Vector4, Vector4, Vector4, Vector4, Vector4, CommandBuffer, RTHandle, int, int, int, int, int, int, int, int, int, int, int, bool)
Effective Job of drawing Lens Flare Screen Space.
Declaration
public static void DoLensFlareScreenSpaceCommon(Material lensFlareShader, Camera cam, float actualWidth, float actualHeight, Color tintColor, Texture bloomTexture, Texture spectralLut, Texture streakTextureTmp, Texture streakTextureTmp2, Vector4 parameters1, Vector4 parameters2, Vector4 parameters3, Vector4 parameters4, Vector4 parameters5, CommandBuffer cmd, RTHandle result, int _BloomTexture, int _LensFlareScreenSpaceResultTexture, int _LensFlareScreenSpaceSpectralLut, int _LensFlareScreenSpaceStreakTex, int _LensFlareScreenSpaceMipLevel, int _LensFlareScreenSpaceTintColor, int _LensFlareScreenSpaceParams1, int _LensFlareScreenSpaceParams2, int _LensFlareScreenSpaceParams3, int _LensFlareScreenSpaceParams4, int _LensFlareScreenSpaceParams5, 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. |
Color | tintColor | tintColor to multiply all the flare by |
Texture | bloomTexture | bloom texture used as data for the effect |
Texture | spectralLut | spectralLut used for chromatic aberration effect |
Texture | streakTextureTmp | Texture used for the multiple pass streaks effect |
Texture | streakTextureTmp2 | Texture used for the multiple pass streaks effect |
Vector4 | parameters1 | globalIntensity, regularIntensity, reverseIntensity, warpedIntensity |
Vector4 | parameters2 | vignetteEffect, startingPosition, scale, freeSlot |
Vector4 | parameters3 | samples, sampleDimmer, chromaticAbberationIntensity, chromaticAbberationSamples |
Vector4 | parameters4 | streaksIntensity, streaksLength, streaksOrientation, streaksThreshold |
Vector4 | parameters5 | downsampleStreak, warpedFlareScaleX, warpedFlareScaleY, freeSlot |
CommandBuffer | cmd | Command Buffer |
RTHandle | result | |
int | _BloomTexture | ShaderID for the BloomTexture |
int | _LensFlareScreenSpaceResultTexture | |
int | _LensFlareScreenSpaceSpectralLut | ShaderID for the LensFlareScreenSpaceSpectralLut texture |
int | _LensFlareScreenSpaceStreakTex | ShaderID for the LensFlareScreenSpaceStreakTex streak temp texture |
int | _LensFlareScreenSpaceMipLevel | ShaderID for the LensFlareScreenSpaceMipLevel parameter |
int | _LensFlareScreenSpaceTintColor | ShaderID for the LensFlareScreenSpaceTintColor color |
int | _LensFlareScreenSpaceParams1 | ShaderID for the LensFlareScreenSpaceParams1 |
int | _LensFlareScreenSpaceParams2 | ShaderID for the LensFlareScreenSpaceParams2 |
int | _LensFlareScreenSpaceParams3 | ShaderID for the LensFlareScreenSpaceParams3 |
int | _LensFlareScreenSpaceParams4 | ShaderID for the LensFlareScreenSpaceParams4 |
int | _LensFlareScreenSpaceParams5 | ShaderID for the LensFlareScreenSpaceParams5 |
bool | debugView | Information if we are in debug mode or not |