Пример #1
0
        ProceduralSky GetDefaultPreviewSkyInstance()
        {
            if (m_DefaultPreviewSky == null)
            {
                m_DefaultPreviewSky = ScriptableObject.CreateInstance <ProceduralSky>();
            }

            return(m_DefaultPreviewSky);
        }
        public void Build(HDRenderPipelineAsset hdAsset, IBLFilterGGX iblFilterGGX)
        {
            m_BakingSkyRenderingContext = new SkyRenderingContext(iblFilterGGX, (int)hdAsset.renderPipelineSettings.lightLoopSettings.skyReflectionSize, false);
            m_SkyRenderingContext       = new SkyRenderingContext(iblFilterGGX, (int)hdAsset.renderPipelineSettings.lightLoopSettings.skyReflectionSize, true);

            m_StandardSkyboxMaterial      = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.skyboxCubemap);
            m_BlitCubemapMaterial         = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.blitCubemap);
            m_OpaqueAtmScatteringMaterial = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.opaqueAtmosphericScattering);

            m_LightingOverrideVolumeStack = VolumeManager.instance.CreateStack();
            m_LightingOverrideLayerMask   = hdAsset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask;

#if UNITY_EDITOR
            m_DefaultPreviewSky = ScriptableObject.CreateInstance <ProceduralSky>();
#endif
        }
Пример #3
0
 public ProceduralSkyRenderer(ProceduralSky proceduralSkyParams)
 {
     m_ProceduralSkyParams = proceduralSkyParams;
     m_PropertyBlock       = new MaterialPropertyBlock();
 }