コード例 #1
0
ファイル: StaticLightingSky.cs プロジェクト: Verantor/SectorX
 void OnEnable()
 {
     UpdateCurrentStaticLightingSky();
     if (m_Profile != null)
     {
         SkyManager.RegisterStaticLightingSky(this);
     }
 }
コード例 #2
0
ファイル: StaticLightingSky.cs プロジェクト: Verantor/SectorX
        void OnDisable()
        {
            if (m_Profile != null)
            {
                SkyManager.UnRegisterStaticLightingSky(this);
            }

            Reset();
        }
コード例 #3
0
ファイル: StaticLightingSky.cs プロジェクト: vault51/Graphics
        void OnDisable()
        {
            if (m_Profile != null)
            {
                SkyManager.UnRegisterStaticLightingSky(this);
            }

            ResetSky();
            ResetCloud();
            ResetVolumetricCloud();
        }
コード例 #4
0
        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
            };
        }