void OnEnable() { UpdateCurrentStaticLightingSky(); if (m_Profile != null) { SkyManager.RegisterStaticLightingSky(this); } }
void OnDisable() { if (m_Profile != null) { SkyManager.UnRegisterStaticLightingSky(this); } Reset(); }
void OnDisable() { if (m_Profile != null) { SkyManager.UnRegisterStaticLightingSky(this); } ResetSky(); ResetCloud(); ResetVolumetricCloud(); }
public void Init(HDRenderPipelineAsset asset, SkyManager skyManager, HDRaytracingManager raytracingManager, SharedRTManager sharedRTManager) { // Keep track of the pipeline asset m_PipelineAsset = asset; m_PipelineResources = asset.renderPipelineResources; // Keep track of the sky manager m_SkyManager = skyManager; // keep track of the ray tracing manager m_RaytracingManager = raytracingManager; // Keep track of the shared rt manager m_SharedRTManager = sharedRTManager; m_RaytracingFlagTarget = RTHandles.Alloc(Vector2.one, filterMode: FilterMode.Point, colorFormat: GraphicsFormat.R8_SNorm, enableRandomWrite: true, useMipMap: false, name: "RaytracingFlagTexture"); m_DebugRaytracingTexture = RTHandles.Alloc(Vector2.one, filterMode: FilterMode.Point, colorFormat: GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite: true, useDynamicScale: true, useMipMap: false, name: "DebugRaytracingBuffer"); m_RaytracingFlagStateBlock = new RenderStateBlock { depthState = new DepthState(false, CompareFunction.LessEqual), mask = RenderStateMask.Depth }; }