浏览代码

Only store decal textures to atlas if decal is visible, debounce out of memory decal atlas warning.

/main
Paul Melamed 7 年前
当前提交
35466812
共有 3 个文件被更改,包括 8 次插入6 次删除
  1. 1
      ScriptableRenderPipeline/HDRenderPipeline/CHANGELOG.md
  2. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalSystem.cs
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs

1
ScriptableRenderPipeline/HDRenderPipeline/CHANGELOG.md


- Improve the quality of volumetric lighting reprojection.
- Optimize Morton Order code in the Subsurface Scattering pass.
- Planar Reflection Probe support roughness (gaussian convolution of captured probe)
- Only store decal textures to atlas if decal is visible, debounce out of memory decal atlas warning.
### Features
- Screen Space Refraction projection model (Proxy raycasting, HiZ raymarching)

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalSystem.cs


private Texture2DAtlas m_Atlas = null;
public bool m_AllocationSuccess = true;
public bool m_PrevAllocationSuccess = true;
public Texture2DAtlas Atlas
{

{
if (m_NumResults == 0)
return;
// only add if anything in this decal set is visible.
AddToTextureList(ref instance.m_TextureList);
int instanceCount = 0;
int batchCount = 0;
Matrix4x4[] decalToWorldBatch = null;

// updates textures, texture atlas indices and blend value
public void UpdateCachedMaterialData()
{
//instance.m_AllocationSuccess = true;
pair.Value.InitializeMaterialValues();
pair.Value.AddToTextureList(ref m_TextureList);
pair.Value.InitializeMaterialValues();
}
}

AddTexture(cmd, textureScaleBias);
}
if(!m_AllocationSuccess) // still failed to allocate, decal atlas size needs to increase
if(!m_AllocationSuccess && m_PrevAllocationSuccess) // still failed to allocate, decal atlas size needs to increase, debounce so that we don't spam the console with warnings
m_PrevAllocationSuccess = m_AllocationSuccess;
}
public void CreateDrawData()

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


DecalSystem.instance.EndCull();
m_DbufferManager.vsibleDecalCount = DecalSystem.m_DecalsVisibleThisFrame;
DecalSystem.instance.UpdateCachedMaterialData(); // textures, alpha or fade distances could've changed
DecalSystem.instance.UpdateTextureAtlas(cmd); // as this is only used for transparent pass, would've been nice not to have to do this if no transparent renderers are visible
DecalSystem.instance.UpdateTextureAtlas(cmd); // as this is only used for transparent pass, would've been nice not to have to do this if no transparent renderers are visible, needs to happen after CreateDrawData
}
}
renderContext.SetupCameraProperties(camera, m_FrameSettings.enableStereo);

正在加载...
取消
保存