Class WaterManager
- Namespace
- KSP.Rendering.Planets
- Assembly
- Assembly-CSharp.dll
public class WaterManager
- Inheritance
-
WaterManager
- Inherited Members
-
- Extension Methods
-
Fields
CurrentOceanLod
public int CurrentOceanLod
Field Value
- int
DeltaTime
Field Value
- float
DetectObjectPosition
public NativeArray<Vector3> DetectObjectPosition
Field Value
- NativeArray<Vector3>
DrawOceanCommand
public CommandBuffer DrawOceanCommand
Field Value
- CommandBuffer
DrawUnderWaterCommand
public CommandBuffer DrawUnderWaterCommand
Field Value
- CommandBuffer
GenerateFarFoamCycleTextureShader
public ComputeShader GenerateFarFoamCycleTextureShader
Field Value
- ComputeShader
GenerateFoamMipmapShader
public ComputeShader GenerateFoamMipmapShader
Field Value
- ComputeShader
GenerateLandbasedWaterMaskCommand
public CommandBuffer GenerateLandbasedWaterMaskCommand
Field Value
- CommandBuffer
GenerateOceanSphereVertsJobHandle
public JobHandle GenerateOceanSphereVertsJobHandle
Field Value
- JobHandle
GenerateOceanVertsJobHandle
public JobHandle GenerateOceanVertsJobHandle
Field Value
- JobHandle
GenerateUnderOceanMaskCommand
public CommandBuffer GenerateUnderOceanMaskCommand
Field Value
- CommandBuffer
GenerateUnderWaterLightingShader
public ComputeShader GenerateUnderWaterLightingShader
Field Value
- ComputeShader
GenerateWaterAnimationShader
public ComputeShader GenerateWaterAnimationShader
Field Value
- ComputeShader
GenerateWaterDepthCommand
public CommandBuffer GenerateWaterDepthCommand
Field Value
- CommandBuffer
GenerateWaterFoamShader
public ComputeShader GenerateWaterFoamShader
Field Value
- ComputeShader
InitWaterDefaultDepthTextureCommand
public CommandBuffer InitWaterDefaultDepthTextureCommand
Field Value
- CommandBuffer
IsCameraUnderWater
public bool IsCameraUnderWater
Field Value
- bool
IsUnderWater
public NativeArray<bool> IsUnderWater
Field Value
- NativeArray<bool>
MAX_RUNNING_TIME
public static readonly float MAX_RUNNING_TIME
Field Value
- float
NeedDrawOcean
public bool NeedDrawOcean
Field Value
- bool
NeedDrawSphereOcean
public bool NeedDrawSphereOcean
Field Value
- bool
NeedDrawUnderLandBasedWaterEffect
public bool NeedDrawUnderLandBasedWaterEffect
Field Value
- bool
NeedDrawUnderOceanEffect
public bool NeedDrawUnderOceanEffect
Field Value
- bool
NeedWaterDetect
public bool NeedWaterDetect
Field Value
- bool
OceanQuadVerts
public NativeArray<Vector3>[] OceanQuadVerts
Field Value
- NativeArray<Vector3>[]
OceanSphereVerts
public NativeArray<Vector3> OceanSphereVerts
Field Value
- NativeArray<Vector3>
OceanSphereVertsFaceNorthMatrixBuffer_X
public ComputeBuffer OceanSphereVertsFaceNorthMatrixBuffer_X
Field Value
- ComputeBuffer
OceanSphereVertsFaceNorthMatrixBuffer_Y
public ComputeBuffer OceanSphereVertsFaceNorthMatrixBuffer_Y
Field Value
- ComputeBuffer
OceanSphereVertsFaceNorthMatrix_X
public NativeArray<Vector3> OceanSphereVertsFaceNorthMatrix_X
Field Value
- NativeArray<Vector3>
OceanSphereVertsFaceNorthMatrix_Y
public NativeArray<Vector3> OceanSphereVertsFaceNorthMatrix_Y
Field Value
- NativeArray<Vector3>
OceanSphereVertsIndicesBuffer
public ComputeBuffer OceanSphereVertsIndicesBuffer
Field Value
- ComputeBuffer
OceanSphereVertsOnPlanet
public NativeArray<Vector3> OceanSphereVertsOnPlanet
Field Value
- NativeArray<Vector3>
OceanSphereVertsOnPlanetBuffer
public ComputeBuffer OceanSphereVertsOnPlanetBuffer
Field Value
- ComputeBuffer
OceanSphereVertsWorldPosition
public NativeArray<Vector3> OceanSphereVertsWorldPosition
Field Value
- NativeArray<Vector3>
OceanSphereVertsWorldPositionBuffer
public ComputeBuffer OceanSphereVertsWorldPositionBuffer
Field Value
- ComputeBuffer
OceanVertsFaceNorthMatrixBuffer_X
public ComputeBuffer[] OceanVertsFaceNorthMatrixBuffer_X
Field Value
- ComputeBuffer[]
OceanVertsFaceNorthMatrixBuffer_Y
public ComputeBuffer[] OceanVertsFaceNorthMatrixBuffer_Y
Field Value
- ComputeBuffer[]
OceanVertsFaceNorthMatrix_X
public NativeArray<Vector3>[] OceanVertsFaceNorthMatrix_X
Field Value
- NativeArray<Vector3>[]
OceanVertsFaceNorthMatrix_Y
public NativeArray<Vector3>[] OceanVertsFaceNorthMatrix_Y
Field Value
- NativeArray<Vector3>[]
OceanVertsIndicesBuffer
public ComputeBuffer[] OceanVertsIndicesBuffer
Field Value
- ComputeBuffer[]
OceanVertsOnOceanPlane
public NativeArray<Vector2>[] OceanVertsOnOceanPlane
Field Value
- NativeArray<Vector2>[]
OceanVertsOnOceanPlaneBuffer
public ComputeBuffer[] OceanVertsOnOceanPlaneBuffer
Field Value
- ComputeBuffer[]
OceanVertsOnPlanet
public NativeArray<Vector3>[] OceanVertsOnPlanet
Field Value
- NativeArray<Vector3>[]
OceanVertsOnPlanetBuffer
public ComputeBuffer[] OceanVertsOnPlanetBuffer
Field Value
- ComputeBuffer[]
OceanVertsSphereUV
public NativeArray<Vector2>[] OceanVertsSphereUV
Field Value
- NativeArray<Vector2>[]
OceanVertsSphereUVBuffer
public ComputeBuffer[] OceanVertsSphereUVBuffer
Field Value
- ComputeBuffer[]
OceanVertsWorldPosition
public NativeArray<Vector3>[] OceanVertsWorldPosition
Field Value
- NativeArray<Vector3>[]
OceanVertsWorldPositionBuffer
public ComputeBuffer[] OceanVertsWorldPositionBuffer
Field Value
- ComputeBuffer[]
RunningTime
Field Value
- float
WaterDetectJobHandle
public JobHandle WaterDetectJobHandle
Field Value
- JobHandle
WaterSurfacePosition
public NativeArray<Vector3> WaterSurfacePosition
Field Value
- NativeArray<Vector3>
Properties
BlurUnderWaterLightingHorizontallyKernel
public int BlurUnderWaterLightingHorizontallyKernel { get; }
Property Value
- int
BlurUnderWaterLightingVerticallyKernel
public int BlurUnderWaterLightingVerticallyKernel { get; }
Property Value
- int
BluredUnderWaterLightingTexture
public RenderTexture BluredUnderWaterLightingTexture { get; }
Property Value
- RenderTexture
ClearFoamHalf2MipmapKernel
public int ClearFoamHalf2MipmapKernel { get; }
Property Value
- int
ClearFoamKernel
public int ClearFoamKernel { get; }
Property Value
- int
ClearFoamMipmapKernel
public int ClearFoamMipmapKernel { get; }
Property Value
- int
ComputeThreadSize
public int ComputeThreadSize { get; }
Property Value
- int
CopyFoamToSubregionKernel
public int CopyFoamToSubregionKernel { get; }
Property Value
- int
CreateOceanVertsKernel
public int CreateOceanVertsKernel { get; }
Property Value
- int
CreateOceanVertsShader
public ComputeShader CreateOceanVertsShader { get; }
Property Value
- ComputeShader
CreateUnderOceanRegionVertsKernel
public int CreateUnderOceanRegionVertsKernel { get; }
Property Value
- int
FarRenderTextureSize
public int FarRenderTextureSize { get; }
Property Value
- int
FarWaterAnimationTexture
public RenderTexture FarWaterAnimationTexture { get; }
Property Value
- RenderTexture
FarWaterFoamCycleTexture
public RenderTexture FarWaterFoamCycleTexture { get; }
Property Value
- RenderTexture
FarWaterFoamCycleTextureTemp
public RenderTexture FarWaterFoamCycleTextureTemp { get; }
Property Value
- RenderTexture
FarWaterFoamShapeTexture
public RenderTexture FarWaterFoamShapeTexture { get; }
Property Value
- RenderTexture
FarWaterFoamTexture0
public RenderTexture FarWaterFoamTexture0 { get; }
Property Value
- RenderTexture
FarWaterFoamTexture1
public RenderTexture FarWaterFoamTexture1 { get; }
Property Value
- RenderTexture
GenerateDepthMaterial
public Material GenerateDepthMaterial { get; set; }
Property Value
- Material
GenerateFarWaterAnimationKernel
public int GenerateFarWaterAnimationKernel { get; }
Property Value
- int
GenerateFoamHalf2Mipmap16x16Kernel
public int GenerateFoamHalf2Mipmap16x16Kernel { get; }
Property Value
- int
GenerateFoamHalf2Mipmap2x2Kernel
public int GenerateFoamHalf2Mipmap2x2Kernel { get; }
Property Value
- int
GenerateFoamMipmap16x16Kernel
public int GenerateFoamMipmap16x16Kernel { get; }
Property Value
- int
GenerateFoamMipmap2x2Kernel
public int GenerateFoamMipmap2x2Kernel { get; }
Property Value
- int
GenerateLandBasedUnderWaterLightingKernel
public int GenerateLandBasedUnderWaterLightingKernel { get; }
Property Value
- int
GenerateShallowDepthMaterial
public Material GenerateShallowDepthMaterial { get; set; }
Property Value
- Material
GenerateSphereDepthMaterial
public Material GenerateSphereDepthMaterial { get; set; }
Property Value
- Material
GenerateTerrainDepthMaterial
public Material GenerateTerrainDepthMaterial { get; set; }
Property Value
- Material
GenerateUnderLandBasedWaterMaskMaterial
public Material GenerateUnderLandBasedWaterMaskMaterial { get; set; }
Property Value
- Material
GenerateUnderLandBasedWaterMaskMaterial_1
public Material GenerateUnderLandBasedWaterMaskMaterial_1 { get; set; }
Property Value
- Material
GenerateUnderOceanMaskMaterial
public Material GenerateUnderOceanMaskMaterial { get; set; }
Property Value
- Material
GenerateUnderWaterLightingKernel
public int GenerateUnderWaterLightingKernel { get; }
Property Value
- int
GenerateWaterAnimationKernel
public int GenerateWaterAnimationKernel { get; }
Property Value
- int
GenerateWaterNormalMaterial
public Material GenerateWaterNormalMaterial { get; set; }
Property Value
- Material
LandBasedWaterBackSurfaceShader
public Shader LandBasedWaterBackSurfaceShader { get; set; }
Property Value
- Shader
MirrorFoamXKernel
public int MirrorFoamXKernel { get; }
Property Value
- int
MirrorFoamYKernel
public int MirrorFoamYKernel { get; }
Property Value
- int
OceanActive
public bool OceanActive { get; }
Property Value
- bool
OceanLavaBackSurfaceMaterial
public Material OceanLavaBackSurfaceMaterial { get; set; }
Property Value
- Material
OceanLavaSphereModeMaterial
public Material OceanLavaSphereModeMaterial { get; set; }
Property Value
- Material
OceanWaterBackSurfaceMaterial
public Material OceanWaterBackSurfaceMaterial { get; set; }
Property Value
- Material
OceanWaterSphereModeMaterial
public Material OceanWaterSphereModeMaterial { get; set; }
Property Value
- Material
RenderTextureSize
public int RenderTextureSize { get; }
Property Value
- int
ScreenSpaceShadowTexture
public RenderTexture ScreenSpaceShadowTexture { get; }
Property Value
- RenderTexture
ShallowDepthTexture
public RenderTexture ShallowDepthTexture { get; }
Property Value
- RenderTexture
TerrainDepthTexture
public RenderTexture TerrainDepthTexture { get; }
Property Value
- RenderTexture
UnderLandBasedWaterEffectMaterial
public Material UnderLandBasedWaterEffectMaterial { get; set; }
Property Value
- Material
UnderLandBasedWaterMaskTexture
public RenderTexture UnderLandBasedWaterMaskTexture { get; }
Property Value
- RenderTexture
UnderLandBasedWaterRegionCubeIndicesBuffer
public ComputeBuffer UnderLandBasedWaterRegionCubeIndicesBuffer { get; }
Property Value
- ComputeBuffer
UnderLandBasedWaterRegionCubeVertsBuffer
public ComputeBuffer UnderLandBasedWaterRegionCubeVertsBuffer { get; }
Property Value
- ComputeBuffer
UnderLandBasedWaterRegionPlaneIndicesBuffer
public ComputeBuffer UnderLandBasedWaterRegionPlaneIndicesBuffer { get; }
Property Value
- ComputeBuffer
UnderLandBasedWaterRegionPlaneVertsBuffer
public ComputeBuffer UnderLandBasedWaterRegionPlaneVertsBuffer { get; }
Property Value
- ComputeBuffer
UnderOceanMaskTexture
public RenderTexture UnderOceanMaskTexture { get; }
Property Value
- RenderTexture
UnderOceanRegionVertsBuffer
public ComputeBuffer UnderOceanRegionVertsBuffer { get; }
Property Value
- ComputeBuffer
UnderOceanVertsDensity
public int UnderOceanVertsDensity { get; }
Property Value
- int
UnderWaterEffectMaterial
public Material UnderWaterEffectMaterial { get; set; }
Property Value
- Material
UnderWaterLightingTexture
public RenderTexture UnderWaterLightingTexture { get; }
Property Value
- RenderTexture
UpdateFarFoamKernel
public int UpdateFarFoamKernel { get; }
Property Value
- int
UpdateFoamKernel
public int UpdateFoamKernel { get; }
Property Value
- int
WaterAnimationTexture
public RenderTexture WaterAnimationTexture { get; }
Property Value
- RenderTexture
WaterDepthTexture
public RenderTexture WaterDepthTexture { get; }
Property Value
- RenderTexture
WaterFoamTexture0
public RenderTexture WaterFoamTexture0 { get; }
Property Value
- RenderTexture
WaterFoamTexture1
public RenderTexture WaterFoamTexture1 { get; }
Property Value
- RenderTexture
WaterNormalTexture
public RenderTexture WaterNormalTexture { get; }
Property Value
- RenderTexture
WaterTwoSideDepthTexture
public RenderTexture WaterTwoSideDepthTexture { get; }
Property Value
- RenderTexture
Methods
Create(PrevisGameInstance)
public static void Create(PrevisGameInstance previsGameInstance)
Parameters
previsGameInstance PrevisGameInstance
Destroy()
public static void Destroy()
EnumerateWaterDetectObjects(Action<WaterDetectEntry>)
public void EnumerateWaterDetectObjects(Action<WaterManager.WaterDetectEntry> func)
Parameters
func Action<WaterManager.WaterDetectEntry>
GetDetectObjectBody(int)
public CelestialBodyComponent GetDetectObjectBody(int index)
Parameters
index int
Returns
- CelestialBodyComponent
GetGIProbeInDebugScene(string)
public SphericalHarmonicsL2 GetGIProbeInDebugScene(string celestialName)
Parameters
celestialName string
Returns
- SphericalHarmonicsL2
GetLightInfo(ref Vector3, ref Vector3)
public void GetLightInfo(ref Vector3 lightDirection, ref Vector3 lightColor)
Parameters
lightDirection Vector3
lightColor Vector3
GetLightInfoInDebugScene(ref Vector3, ref Vector3)
public void GetLightInfoInDebugScene(ref Vector3 lightDirection, ref Vector3 lightColor)
Parameters
lightDirection Vector3
lightColor Vector3
GetLod(float)
public int GetLod(float heightFromWater)
Parameters
heightFromWater float
Returns
- int
GetOceanSphereSlice()
public int GetOceanSphereSlice()
Returns
- int
GetWaterDetectEntry(uint)
public WaterManager.WaterDetectEntry GetWaterDetectEntry(uint waterDetectObjectId)
Parameters
waterDetectObjectId uint
Returns
- WaterManager.WaterDetectEntry
Instance()
public static WaterManager Instance()
Returns
- WaterManager
IsAssetLoaded()
public bool IsAssetLoaded()
Returns
- bool
IsInDebugScene()
public bool IsInDebugScene()
Returns
- bool
RegisterDrawLandBasedWaterAction(Action)
public void RegisterDrawLandBasedWaterAction(Action action)
Parameters
action Action
RegisterDrawOceanAction(Action)
public void RegisterDrawOceanAction(Action action)
Parameters
action Action
RegisterOceanUpdateAction(Action)
public void RegisterOceanUpdateAction(Action action)
Parameters
action Action
RegisterWaterDetectObject(IWaterDetectObject)
public uint RegisterWaterDetectObject(WaterManager.IWaterDetectObject waterDetectObject)
Parameters
waterDetectObject WaterManager.IWaterDetectObject
Returns
- uint
ResetWaterDetectObjects()
public void ResetWaterDetectObjects()
SetOceanActive(bool)
public void SetOceanActive(bool active)
Parameters
active bool
UnRegisterDrawLandBasedWaterAction(Action)
public void UnRegisterDrawLandBasedWaterAction(Action action)
Parameters
action Action
UnregisterWaterDetectObject(uint)
public void UnregisterWaterDetectObject(uint waterDetectObjectId)
Parameters
waterDetectObjectId uint
UpdateRenderTexture(OceanSpectrumPrecision, int, bool, out bool)
public bool UpdateRenderTexture(OceanSpectrumPrecision precision, int farFoamShapeTextureSize, bool hasFoam, out bool isFarFoamShapeTexUpdate)
Parameters
precision OceanSpectrumPrecision
farFoamShapeTextureSize int
hasFoam bool
isFarFoamShapeTexUpdate bool
Returns
- bool
WaitForGenerateOceanSphereVertsJob()
public void WaitForGenerateOceanSphereVertsJob()
WaitForGenerateOceanVertsJob()
public void WaitForGenerateOceanVertsJob()