public SkyRenderingContext(IBLFilterGGX filterGGX, int resolution, bool supportsConvolution) { m_IBLFilterGGX = filterGGX; m_SupportsConvolution = supportsConvolution; RebuildTextures(resolution); }
public void Build() { // Create unititialized. Lazy initialization is performed later. m_iblFilterGgx = new IBLFilterGGX(); // TODO: We need to have an API to send our sky information to Enlighten. For now use a workaround through skybox/cubemap material... m_StandardSkyboxMaterial = Utilities.CreateEngineMaterial("Skybox/Cubemap"); m_CurrentUpdateTime = 0.0f; }
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.shaders.skyboxCubemapPS); m_BlitCubemapMaterial = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.shaders.blitCubemapPS); m_OpaqueAtmScatteringMaterial = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.shaders.opaqueAtmosphericScatteringPS); m_LightingOverrideVolumeStack = VolumeManager.instance.CreateStack(); m_LightingOverrideLayerMask = hdAsset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask; }
public void Build(RenderPipelineResources renderPipelinesResources) { // Create unititialized. Lazy initialization is performed later. m_iblFilterGgx = new IBLFilterGGX(renderPipelinesResources); // TODO: We need to have an API to send our sky information to Enlighten. For now use a workaround through skybox/cubemap material... //m_StandardSkyboxMaterial = Utilities.CreateEngineMaterial(renderPipelinesResources.skyboxCubemap); //m_BlitCubemapMaterial = Utilities.CreateEngineMaterial(renderPipelinesResources.blitCubemap); m_CurrentUpdateTime = 0.0f; }
public void Build(HDRenderPipelineAsset hdAsset, IBLFilterGGX iblFilterGGX) { m_iblFilterGgx = iblFilterGGX; // TODO: We need to have an API to send our sky information to Enlighten. For now use a workaround through skybox/cubemap material... m_StandardSkyboxMaterial = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.skyboxCubemap); m_BlitCubemapMaterial = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.blitCubemap); m_OpaqueAtmScatteringMaterial = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.opaqueAtmosphericScattering); m_CurrentUpdateTime = 0.0f; }
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 }
public PlanarReflectionProbeCache(IBLFilterGGX iblFilter, int cacheSize, int probeSize, TextureFormat probeFormat, bool isMipmaped) { // BC6H requires CPP feature not yet available probeFormat = TextureFormat.RGBAHalf; Debug.Assert(probeFormat == TextureFormat.BC6H || probeFormat == TextureFormat.RGBAHalf, "Reflection Probe Cache format for HDRP can only be BC6H or FP16."); m_ProbeSize = probeSize; m_CacheSize = cacheSize; m_TextureCache = new TextureCache2D(); m_TextureCache.AllocTextureArray(cacheSize, probeSize, probeSize, probeFormat, isMipmaped); m_IBLFilterGGX = iblFilter; m_PerformBC6HCompression = probeFormat == TextureFormat.BC6H; InitializeProbeBakingStates(); }
public PlanarReflectionProbeCache(HDRenderPipelineAsset hdAsset, IBLFilterGGX iblFilter, int cacheSize, int probeSize, TextureFormat probeFormat, bool isMipmaped) { m_ConvertTextureMaterial = CoreUtils.CreateEngineMaterial(hdAsset.renderPipelineResources.shaders.blitCubeTextureFacePS); m_ConvertTextureMPB = new MaterialPropertyBlock(); // BC6H requires CPP feature not yet available probeFormat = TextureFormat.RGBAHalf; Debug.Assert(probeFormat == TextureFormat.BC6H || probeFormat == TextureFormat.RGBAHalf, "Reflection Probe Cache format for HDRP can only be BC6H or FP16."); m_ProbeSize = probeSize; m_CacheSize = cacheSize; m_TextureCache = new TextureCache2D("PlanarReflectionProbe"); m_TextureCache.AllocTextureArray(cacheSize, probeSize, probeSize, probeFormat, isMipmaped); m_IBLFilterGGX = iblFilter; m_PerformBC6HCompression = probeFormat == TextureFormat.BC6H; InitializeProbeBakingStates(); }