Ejemplo n.º 1
0
        public override void Build(HDRenderPipelineAsset hdAsset, HDRenderPipelineRuntimeResources defaultResources)
        {
            PreIntegratedFGD.instance.Build(PreIntegratedFGD.FGDIndex.FGD_GGXAndDisneyDiffuse);
            LTCAreaLight.instance.Build();

            // Initialize the dual scattering LUT.
            m_PreIntegratedFiberScatteringLUT = new RenderTexture(m_Dim, m_Dim, 0, GraphicsFormat.R16G16_SFloat)
            {
                dimension         = TextureDimension.Tex3D,
                volumeDepth       = m_Dim,
                enableRandomWrite = true,
                hideFlags         = HideFlags.HideAndDontSave,
                filterMode        = FilterMode.Point,
                wrapMode          = TextureWrapMode.Clamp,
                name = CoreUtils.GetRenderTargetAutoName(m_Dim, m_Dim, 0, GraphicsFormat.R16G16_SFloat, "PreIntegratedFiberScattering")
            };
            m_PreIntegratedFiberScatteringLUT.Create();

            m_PreIntegratedFiberAverageScatteringLUT = new RenderTexture(m_Dim, m_Dim, 0, GraphicsFormat.R16G16B16A16_SFloat)
            {
                dimension         = TextureDimension.Tex3D,
                volumeDepth       = m_Dim,
                enableRandomWrite = true,
                hideFlags         = HideFlags.HideAndDontSave,
                filterMode        = FilterMode.Point,
                wrapMode          = TextureWrapMode.Clamp,
                name = CoreUtils.GetRenderTargetAutoName(m_Dim, m_Dim, 0, GraphicsFormat.R16G16B16A16_SFloat, "PreIntegratedAverageFiberScattering")
            };
            m_PreIntegratedFiberAverageScatteringLUT.Create();

            m_PreIntegratedFiberScatteringCS = defaultResources.shaders.preIntegratedFiberScatteringCS;
        }
Ejemplo n.º 2
0
        public void InitData(HDRenderPipelineRuntimeResources renderPipelineResources)
        {
            m_DebugLightVolumeMaterial       = CoreUtils.CreateEngineMaterial(renderPipelineResources.shaders.debugLightVolumePS);
            m_DebugLightVolumeCompute        = renderPipelineResources.shaders.debugLightVolumeCS;
            m_DebugLightVolumeGradientKernel = m_DebugLightVolumeCompute.FindKernel("LightVolumeGradient");
            m_DebugLightVolumeColorsKernel   = m_DebugLightVolumeCompute.FindKernel("LightVolumeColors");
            m_ColorGradientTexture           = renderPipelineResources.textures.colorGradient;

            m_Blit = Blitter.GetBlitMaterial(TextureDimension.Tex2D);
        }
Ejemplo n.º 3
0
        public override void Build(HDRenderPipelineAsset hdAsset, HDRenderPipelineRuntimeResources defaultResources)
        {
            // Create Materials
            m_preIntegratedFGDMaterial_Ward = CoreUtils.CreateEngineMaterial(defaultResources.shaders.preIntegratedFGD_WardPS);
            if (m_preIntegratedFGDMaterial_Ward == null)
            {
                throw new Exception("Failed to create material for Ward BRDF pre-integration!");
            }

            m_preIntegratedFGDMaterial_CookTorrance = CoreUtils.CreateEngineMaterial(defaultResources.shaders.preIntegratedFGD_CookTorrancePS);
            if (m_preIntegratedFGDMaterial_CookTorrance == null)
            {
                throw new Exception("Failed to create material for Cook-Torrance BRDF pre-integration!");
            }

            // Create render textures where we will render the FGD tables
            m_preIntegratedFGD_Ward            = new RenderTexture(128, 128, 0, GraphicsFormat.A2B10G10R10_UNormPack32);
            m_preIntegratedFGD_Ward.hideFlags  = HideFlags.HideAndDontSave;
            m_preIntegratedFGD_Ward.filterMode = FilterMode.Bilinear;
            m_preIntegratedFGD_Ward.wrapMode   = TextureWrapMode.Clamp;
            m_preIntegratedFGD_Ward.hideFlags  = HideFlags.DontSave;
            m_preIntegratedFGD_Ward.name       = CoreUtils.GetRenderTargetAutoName(128, 128, 1, GraphicsFormat.A2B10G10R10_UNormPack32, "PreIntegratedFGD_Ward");
            m_preIntegratedFGD_Ward.Create();

            m_preIntegratedFGD_CookTorrance            = new RenderTexture(128, 128, 0, GraphicsFormat.A2B10G10R10_UNormPack32);
            m_preIntegratedFGD_CookTorrance.hideFlags  = HideFlags.HideAndDontSave;
            m_preIntegratedFGD_CookTorrance.filterMode = FilterMode.Bilinear;
            m_preIntegratedFGD_CookTorrance.wrapMode   = TextureWrapMode.Clamp;
            m_preIntegratedFGD_CookTorrance.hideFlags  = HideFlags.DontSave;
            m_preIntegratedFGD_CookTorrance.name       = CoreUtils.GetRenderTargetAutoName(128, 128, 1, GraphicsFormat.A2B10G10R10_UNormPack32, "PreIntegratedFGD_CookTorrance");
            m_preIntegratedFGD_CookTorrance.Create();

            // LTC data

            m_LtcData = new Texture2DArray(LTCAreaLight.k_LtcLUTResolution, LTCAreaLight.k_LtcLUTResolution, 3, GraphicsFormat.R16G16B16A16_SFloat, TextureCreationFlags.None)
            {
                hideFlags  = HideFlags.HideAndDontSave,
                wrapMode   = TextureWrapMode.Clamp,
                filterMode = FilterMode.Bilinear,
                name       = CoreUtils.GetTextureAutoName(LTCAreaLight.k_LtcLUTResolution, LTCAreaLight.k_LtcLUTResolution, GraphicsFormat.R16G16B16A16_SFloat, depth: 2, dim: TextureDimension.Tex2DArray, name: "LTC_LUT")
            };

            // Caution: This need to match order define in AxFLTCAreaLight
            LTCAreaLight.LoadLUT(m_LtcData, 0, GraphicsFormat.R16G16B16A16_SFloat, LTCAreaLight.s_LtcMatrixData_GGX);
            // Warning: check /Material/AxF/AxFLTCAreaLight/LtcData.GGX2.cs: 5 columns are needed, the entries are NOT normalized!
            // For now, we patch for this in LoadLUT, which should affect the loading of s_LtcGGXMatrixData for the rest of the materials
            // (Lit, etc.)

            m_LtcData.Apply();

            // TODO BugFix:
            // We still bind the original data for now, see AxFLTCAreaLight.hlsl: when using a local table, results differ,
            // even if we patch the non-normalization error in the 8th column when calling the LTCInvMatrix loading routine (LoadLUT).
            LTCAreaLight.instance.Build();
        }
        public PlanarReflectionProbeCache(HDRenderPipelineRuntimeResources defaultResources, IBLFilterGGX iblFilter, int atlasResolution, GraphicsFormat probeFormat, bool isMipmaped)
        {
            m_ConvertTextureMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitCubeTextureFacePS);
            m_ConvertTextureMPB      = new MaterialPropertyBlock();

            m_ProbeSize    = atlasResolution;
            m_TextureAtlas = new PowerOfTwoTextureAtlas(atlasResolution, 0, probeFormat, useMipMap: isMipmaped, name: "PlanarReflectionProbe Atlas");
            m_IBLFilterGGX = iblFilter;

            m_ProbeFormat = probeFormat;
        }
Ejemplo n.º 5
0
        public void Init(HDRenderPipelineRuntimeResources rpResources, HDRenderPipeline renderPipeline)
        {
            // Keep track of the resources
            m_DiffuseDenoiser  = rpResources.shaders.diffuseDenoiserCS;
            m_OwenScrambleRGBA = rpResources.textures.owenScrambledRGBATex;

            m_RenderPipeline = renderPipeline;

            // Grab all the kernels we'll eventually need
            m_BilateralFilterSingleKernel = m_DiffuseDenoiser.FindKernel("BilateralFilterSingle");
            m_BilateralFilterColorKernel  = m_DiffuseDenoiser.FindKernel("BilateralFilterColor");
            m_GatherSingleKernel          = m_DiffuseDenoiser.FindKernel("GatherSingle");
            m_GatherColorKernel           = m_DiffuseDenoiser.FindKernel("GatherColor");
        }
Ejemplo n.º 6
0
        public void InitShadowManager(HDRenderPipelineRuntimeResources renderPipelineResources, HDShadowInitParameters initParams, RenderGraph renderGraph, Shader clearShader)
        {
            // Even when shadows are disabled (maxShadowRequests == 0) we need to allocate compute buffers to avoid having
            // resource not bound errors when dispatching a compute shader.
            m_ShadowDataBuffer            = new ComputeBuffer(Mathf.Max(initParams.maxShadowRequests, 1), System.Runtime.InteropServices.Marshal.SizeOf(typeof(HDShadowData)));
            m_DirectionalShadowDataBuffer = new ComputeBuffer(1, System.Runtime.InteropServices.Marshal.SizeOf(typeof(HDDirectionalShadowData)));
            m_MaxShadowRequests           = initParams.maxShadowRequests;
            m_ShadowRequestCount          = 0;

            if (initParams.maxShadowRequests == 0)
            {
                return;
            }

            m_ClearShadowMaterial = CoreUtils.CreateEngineMaterial(clearShader);
            m_BlitShadowMaterial  = CoreUtils.CreateEngineMaterial(renderPipelineResources.shaders.shadowBlitPS);

            // Prevent the list from resizing their internal container when we add shadow requests
            m_ShadowDatas.Capacity        = Math.Max(initParams.maxShadowRequests, m_ShadowDatas.Capacity);
            m_ShadowResolutionRequests    = new HDShadowResolutionRequest[initParams.maxShadowRequests];
            m_ShadowRequests              = new HDShadowRequest[initParams.maxShadowRequests];
            m_CachedDirectionalShadowData = new HDDirectionalShadowData[1]; // we only support directional light shadow

            for (int i = 0; i < initParams.maxShadowRequests; i++)
            {
                m_ShadowResolutionRequests[i] = new HDShadowResolutionRequest();
            }

            // The cascade atlas will be allocated only if there is a directional light
            m_Atlas = new HDDynamicShadowAtlas(renderPipelineResources, renderGraph, useSharedTexture: false, initParams.punctualLightShadowAtlas.shadowAtlasResolution, initParams.punctualLightShadowAtlas.shadowAtlasResolution,
                                               HDShaderIDs._ShadowmapAtlas, m_ClearShadowMaterial, initParams.maxShadowRequests, initParams, depthBufferBits: initParams.punctualLightShadowAtlas.shadowAtlasDepthBits, name: "Shadow Map Atlas");
            // Cascade atlas render texture will only be allocated if there is a shadow casting directional light
            HDShadowAtlas.BlurAlgorithm cascadeBlur = GetDirectionalShadowAlgorithm() == DirectionalShadowAlgorithm.IMS ? HDShadowAtlas.BlurAlgorithm.IM : HDShadowAtlas.BlurAlgorithm.None;
            m_CascadeAtlas = new HDDynamicShadowAtlas(renderPipelineResources, renderGraph, useSharedTexture: false, 1, 1, HDShaderIDs._ShadowmapCascadeAtlas, m_ClearShadowMaterial, initParams.maxShadowRequests, initParams, cascadeBlur, depthBufferBits: initParams.directionalShadowsDepthBits, name: "Cascade Shadow Map Atlas");

            if (ShaderConfig.s_AreaLights == 1)
            {
                m_AreaLightShadowAtlas = new HDDynamicShadowAtlas(renderPipelineResources, renderGraph, useSharedTexture: false, initParams.areaLightShadowAtlas.shadowAtlasResolution, initParams.areaLightShadowAtlas.shadowAtlasResolution,
                                                                  HDShaderIDs._ShadowmapAreaAtlas, m_ClearShadowMaterial, initParams.maxShadowRequests, initParams, HDShadowAtlas.BlurAlgorithm.EVSM, depthBufferBits: initParams.areaLightShadowAtlas.shadowAtlasDepthBits, name: "Area Light Shadow Map Atlas");
            }

            cachedShadowManager.InitPunctualShadowAtlas(renderPipelineResources, renderGraph, useSharedTexture: true, initParams.cachedPunctualLightShadowAtlas, initParams.cachedPunctualLightShadowAtlas,
                                                        HDShaderIDs._CachedShadowmapAtlas, m_ClearShadowMaterial, initParams.maxShadowRequests, initParams: initParams, depthBufferBits: initParams.punctualLightShadowAtlas.shadowAtlasDepthBits, name: "Cached Shadow Map Atlas");
            if (ShaderConfig.s_AreaLights == 1)
            {
                cachedShadowManager.InitAreaLightShadowAtlas(renderPipelineResources, renderGraph, useSharedTexture: true, initParams.cachedAreaLightShadowAtlas, initParams.cachedAreaLightShadowAtlas,
                                                             HDShaderIDs._CachedAreaLightShadowmapAtlas, m_ClearShadowMaterial, initParams.maxShadowRequests, initParams: initParams, HDShadowAtlas.BlurAlgorithm.EVSM, depthBufferBits: initParams.areaLightShadowAtlas.shadowAtlasDepthBits, name: "Cached Area Light Shadow Map Atlas");
            }
        }
Ejemplo n.º 7
0
        public void Init(HDRenderPipelineRuntimeResources rpResources)
        {
            // Keep track of the resources
            m_SSGIDenoiserCS = rpResources.shaders.ssGIDenoiserCS;

            // Fetch the kernels we are going to require
            m_SpatialFilterHalfKernel = m_SSGIDenoiserCS.FindKernel("SpatialFilterHalf");
            m_SpatialFilterKernel     = m_SSGIDenoiserCS.FindKernel("SpatialFilter");

            // Fetch the kernels we are going to require
            m_TemporalFilterHalfKernel = m_SSGIDenoiserCS.FindKernel("TemporalFilterHalf");
            m_TemporalFilterKernel     = m_SSGIDenoiserCS.FindKernel("TemporalFilter");

            m_CopyHistory = m_SSGIDenoiserCS.FindKernel("CopyHistory");
        }
Ejemplo n.º 8
0
        public void Init(HDRenderPipelineRuntimeResources rpResources, HDRenderPipeline renderPipeline)
        {
            // Keep track of the resources
            m_DiffuseDenoiser = rpResources.shaders.diffuseDenoiserCS;

            // Grab all the kernels we'll eventually need
            m_BilateralFilterSingleKernel = m_DiffuseDenoiser.FindKernel("BilateralFilterSingle");
            m_BilateralFilterColorKernel  = m_DiffuseDenoiser.FindKernel("BilateralFilterColor");
            m_GatherSingleKernel          = m_DiffuseDenoiser.FindKernel("GatherSingle");
            m_GatherColorKernel           = m_DiffuseDenoiser.FindKernel("GatherColor");

            // Data required for the online initialization
            m_DenoiserInitialized   = false;
            m_OwnenScrambledTexture = rpResources.textures.owenScrambledRGBATex;
            m_PointDistribution     = new ComputeBuffer(16 * 4, 2 * sizeof(float));
        }
Ejemplo n.º 9
0
        public override void InitAtlas(HDRenderPipelineRuntimeResources renderPipelineResources, RenderGraph renderGraph, bool useSharedTexture, int width, int height, int atlasShaderID, Material clearMaterial, int maxShadowRequests, HDShadowInitParameters initParams, BlurAlgorithm blurAlgorithm = BlurAlgorithm.None, FilterMode filterMode = FilterMode.Bilinear, DepthBits depthBufferBits = DepthBits.Depth16, RenderTextureFormat format = RenderTextureFormat.Shadowmap, string name = "")
        {
            base.InitAtlas(renderPipelineResources, renderGraph, useSharedTexture, width, height, atlasShaderID, clearMaterial, maxShadowRequests, initParams, blurAlgorithm, filterMode, depthBufferBits, format, name);
            m_IsACacheForShadows = true;

            m_AtlasResolutionInSlots = HDUtils.DivRoundUp(width, m_MinSlotSize);
            m_AtlasSlots             = new List <SlotValue>(m_AtlasResolutionInSlots * m_AtlasResolutionInSlots);
            for (int i = 0; i < m_AtlasResolutionInSlots * m_AtlasResolutionInSlots; ++i)
            {
                m_AtlasSlots.Add(SlotValue.Free);
            }

            // Note: If changing the characteristics of the atlas via HDRP asset, the lights OnEnable will not be called again so we are missing them, however we can explicitly
            // put them back up for placement. If this is the first Init of the atlas, the lines below do nothing.
            DefragmentAtlasAndReRender(initParams);
            m_CanTryPlacement    = true;
            m_NeedOptimalPacking = true;
        }
Ejemplo n.º 10
0
        public void Init(HDRenderPipelineRuntimeResources rpResources)
        {
            // Keep track of the resources
            m_TemporalFilterCS = rpResources.shaders.temporalFilterCS;

            m_ValidateHistoryKernel = m_TemporalFilterCS.FindKernel("ValidateHistory");

            m_TemporalAccumulationSingleKernel = m_TemporalFilterCS.FindKernel("TemporalAccumulationSingle");
            m_TemporalAccumulationColorKernel  = m_TemporalFilterCS.FindKernel("TemporalAccumulationColor");
            m_CopyHistoryKernel = m_TemporalFilterCS.FindKernel("CopyHistory");

            m_TemporalAccumulationSingleArrayKernel   = m_TemporalFilterCS.FindKernel("TemporalAccumulationSingleArray");
            m_TemporalAccumulationColorArrayKernel    = m_TemporalFilterCS.FindKernel("TemporalAccumulationColorArray");
            m_BlendHistorySingleArrayKernel           = m_TemporalFilterCS.FindKernel("BlendHistorySingleArray");
            m_BlendHistoryColorArrayKernel            = m_TemporalFilterCS.FindKernel("BlendHistoryColorArray");
            m_BlendHistorySingleArrayNoValidityKernel = m_TemporalFilterCS.FindKernel("BlendHistorySingleArrayNoValidity");
            m_OutputHistoryArrayKernel = m_TemporalFilterCS.FindKernel("OutputHistoryArray");
        }
Ejemplo n.º 11
0
            internal HDShadowAtlasInitParameters(HDRenderPipelineRuntimeResources renderPipelineResources, RenderGraph renderGraph, bool useSharedTexture, int width, int height, int atlasShaderID,
                                                 Material clearMaterial, int maxShadowRequests, HDShadowInitParameters initParams, ConstantBuffer <ShaderVariablesGlobal> cb)
            {
                this.renderPipelineResources = renderPipelineResources;
                this.renderGraph             = renderGraph;
                this.useSharedTexture        = useSharedTexture;
                this.width             = width;
                this.height            = height;
                this.atlasShaderID     = atlasShaderID;
                this.clearMaterial     = clearMaterial;
                this.maxShadowRequests = maxShadowRequests;
                this.initParams        = initParams;
                this.blurAlgorithm     = BlurAlgorithm.None;
                this.filterMode        = FilterMode.Bilinear;
                this.depthBufferBits   = DepthBits.Depth16;
                this.format            = RenderTextureFormat.Shadowmap;
                this.name = "";

                this.cb = cb;
            }
Ejemplo n.º 12
0
        public ReflectionProbeCache(HDRenderPipelineRuntimeResources defaultResources, IBLFilterBSDF[] iblFilterBSDFArray, int cacheSize, int probeSize, GraphicsFormat probeFormat, bool isMipmaped)
        {
            m_ConvertTextureMaterial = CoreUtils.CreateEngineMaterial(defaultResources.shaders.blitCubeTextureFacePS);
            m_ConvertTextureMPB      = new MaterialPropertyBlock();
            m_CubeToPano             = CoreUtils.CreateEngineMaterial(defaultResources.shaders.cubeToPanoPS);

            Debug.Assert(probeFormat == GraphicsFormat.RGB_BC6H_SFloat || probeFormat == GraphicsFormat.B10G11R11_UFloatPack32 || probeFormat == GraphicsFormat.R16G16B16A16_SFloat,
                         "Reflection Probe Cache format for HDRP can only be BC6H, FP16 or R11G11B10.");
            m_ProbeFormat = probeFormat;

            m_ProbeSize    = probeSize;
            m_CacheSize    = cacheSize;
            m_TextureCache = new TextureCacheCubemap("ReflectionProbe", iblFilterBSDFArray.Length);
            m_TextureCache.AllocTextureArray(cacheSize, probeSize, probeFormat, isMipmaped, m_CubeToPano);
            m_IBLFilterBSDF = iblFilterBSDFArray;

            m_PerformBC6HCompression = probeFormat == GraphicsFormat.RGB_BC6H_SFloat;

            InitializeProbeBakingStates();
        }
Ejemplo n.º 13
0
        public virtual void InitAtlas(HDRenderPipelineRuntimeResources renderPipelineResources, RenderGraph renderGraph, bool useSharedTexture, int width, int height, int atlasShaderID, Material clearMaterial, int maxShadowRequests, HDShadowInitParameters initParams, BlurAlgorithm blurAlgorithm = BlurAlgorithm.None, FilterMode filterMode = FilterMode.Bilinear, DepthBits depthBufferBits = DepthBits.Depth16, RenderTextureFormat format = RenderTextureFormat.Shadowmap, string name = "")
        {
            this.width        = width;
            this.height       = height;
            m_FilterMode      = filterMode;
            m_DepthBufferBits = depthBufferBits;
            m_Format          = format;
            m_Name            = name;
            // With render graph, textures are "allocated" every frame so we need to prepare strings beforehand.
            m_MomentName                 = m_Name + "Moment";
            m_MomentCopyName             = m_Name + "MomentCopy";
            m_IntermediateSummedAreaName = m_Name + "IntermediateSummedArea";
            m_SummedAreaName             = m_Name + "SummedAreaFinal";
            m_AtlasShaderID              = atlasShaderID;
            m_ClearMaterial              = clearMaterial;
            m_BlurAlgorithm              = blurAlgorithm;
            m_RenderPipelineResources    = renderPipelineResources;
            m_IsACacheForShadows         = false;

            InitializeRenderGraphOutput(renderGraph, useSharedTexture);
        }
        public void Initialize(HDRenderPipeline renderPipeline)
        {
            // Keep track of the external buffers
            m_RenderPipelineResources           = HDRenderPipelineGlobalSettings.instance.renderPipelineResources;
            m_RenderPipelineRayTracingResources = HDRenderPipelineGlobalSettings.instance.renderPipelineRayTracingResources;

            // Keep track of the render pipeline
            m_RenderPipeline = renderPipeline;

            // Pre allocate the cluster with a dummy size
            m_LightDataGPUArray    = new ComputeBuffer(1, System.Runtime.InteropServices.Marshal.SizeOf(typeof(LightData)));
            m_EnvLightDataGPUArray = new ComputeBuffer(1, System.Runtime.InteropServices.Marshal.SizeOf(typeof(EnvLightData)));

            // Allocate the light cluster buffer at the right size
            m_NumLightsPerCell = renderPipeline.asset.currentPlatformRenderPipelineSettings.lightLoopSettings.maxLightsPerClusterCell;
            int bufferSize = 64 * 64 * 32 * (renderPipeline.asset.currentPlatformRenderPipelineSettings.lightLoopSettings.maxLightsPerClusterCell + 4);

            ResizeClusterBuffer(bufferSize);

            // Create the material required for debug
            m_DebugMaterial = CoreUtils.CreateEngineMaterial(m_RenderPipelineRayTracingResources.lightClusterDebugS);
        }
Ejemplo n.º 15
0
        public virtual void InitAtlas(HDShadowAtlasInitParameters initParams)
        {
            this.width        = initParams.width;
            this.height       = initParams.height;
            m_FilterMode      = initParams.filterMode;
            m_DepthBufferBits = initParams.depthBufferBits;
            m_Format          = initParams.format;
            m_Name            = initParams.name;
            // With render graph, textures are "allocated" every frame so we need to prepare strings beforehand.
            m_MomentName                 = m_Name + "Moment";
            m_MomentCopyName             = m_Name + "MomentCopy";
            m_IntermediateSummedAreaName = m_Name + "IntermediateSummedArea";
            m_SummedAreaName             = m_Name + "SummedAreaFinal";
            m_AtlasShaderID              = initParams.atlasShaderID;
            m_ClearMaterial              = initParams.clearMaterial;
            m_BlurAlgorithm              = initParams.blurAlgorithm;
            m_RenderPipelineResources    = initParams.renderPipelineResources;
            m_IsACacheForShadows         = initParams.isShadowCache;

            m_GlobalConstantBuffer = initParams.cb;

            InitializeRenderGraphOutput(initParams.renderGraph, initParams.useSharedTexture);
        }
Ejemplo n.º 16
0
 public override void Build(HDRenderPipelineAsset hdAsset, HDRenderPipelineRuntimeResources defaultResources)
 {
     PreIntegratedFGD.instance.Build(PreIntegratedFGD.FGDIndex.FGD_GGXAndDisneyDiffuse);
     LTCAreaLight.instance.Build();
     SPTDistribution.instance.Build();
 }
Ejemplo n.º 17
0
 public HDDynamicShadowAtlas(HDRenderPipelineRuntimeResources renderPipelineResources, RenderGraph renderGraph, bool useSharedTexture, int width, int height, int atlasShaderID, Material clearMaterial, int maxShadowRequests, HDShadowInitParameters initParams, BlurAlgorithm blurAlgorithm = BlurAlgorithm.None, FilterMode filterMode = FilterMode.Bilinear, DepthBits depthBufferBits = DepthBits.Depth16, RenderTextureFormat format = RenderTextureFormat.Shadowmap, string name = "")
     : base(renderPipelineResources, renderGraph, useSharedTexture, width, height, atlasShaderID, clearMaterial, maxShadowRequests, initParams, blurAlgorithm, filterMode, depthBufferBits, format, name)
 {
     m_SortedRequestsCache = new HDShadowResolutionRequest[Mathf.CeilToInt(maxShadowRequests)];
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Creates a new instance of the blue noise texture bank.
 /// </summary>
 /// <param name="resources">A reference to the render pipeline resources asset.</param>
 internal BlueNoise(HDRenderPipelineRuntimeResources resources)
 {
     m_RenderPipelineResources = resources;
     InitTextures(16, TextureFormat.Alpha8, resources.textures.blueNoise16LTex, out m_Textures16L, out m_TextureArray16L);
     InitTextures(16, TextureFormat.RGB24, resources.textures.blueNoise16RGBTex, out m_Textures16RGB, out m_TextureArray16RGB);
 }
Ejemplo n.º 19
0
 // Regular interface
 public virtual void Build(HDRenderPipelineAsset hdAsset, HDRenderPipelineRuntimeResources defaultResources)
 {
 }
Ejemplo n.º 20
0
 public IBLFilterGGX(HDRenderPipelineRuntimeResources renderPipelineResources, MipGenerator mipGenerator)
 {
     m_RenderPipelineResources = renderPipelineResources;
     m_MipGenerator            = mipGenerator;
 }
Ejemplo n.º 21
0
 public override void Build(HDRenderPipelineAsset hdAsset, HDRenderPipelineRuntimeResources defaultResources)
 {
     PreIntegratedFGD.instance.Build(PreIntegratedFGD.FGDIndex.FGD_GGXAndDisneyDiffuse);
     LTCAreaLight.instance.Build();
     PreIntegratedAzimuthalScattering.instance.Build();
 }
Ejemplo n.º 22
0
 public override void Build(HDRenderPipelineAsset hdAsset, HDRenderPipelineRuntimeResources defaultResources)
 {
     PreIntegratedFGD.instance.Build(PreIntegratedFGD.FGDIndex.FGD_CharlieAndFabricLambert);
     //LTCAreaLight.instance.Build();
 }