浏览代码

Merge pull request #1313 from Unity-Technologies/Update-UI-of-resolution-of-cookie-and-reflection

Update ui of resolution of cookie and reflection
/main
GitHub 7 年前
当前提交
e798a2c3
共有 7 个文件被更改,包括 64 次插入12 次删除
  1. 2
      ScriptableRenderPipeline/Core/CoreRP/Textures/RTHandleSystem.RTHandle.cs
  2. 1
      ScriptableRenderPipeline/HDRenderPipeline/CHANGELOG.md
  3. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs
  4. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.cs
  5. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/GlobalLightLoopSettings.cs
  6. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs
  7. 51
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/SkyManager.cs

2
ScriptableRenderPipeline/Core/CoreRP/Textures/RTHandleSystem.RTHandle.cs


{
get
{
if(!useScaling)
if (!useScaling)
{
return m_EnableMSAA ? m_RTs[(int)RTCategory.MSAA] : m_RTs[(int)RTCategory.Regular];
}

1
ScriptableRenderPipeline/HDRenderPipeline/CHANGELOG.md


- Default number of planar reflection change from 4 to 2
- Rename _MainDepthTexture to _CameraDepthTexture
- The VolumetricLightingController has been moved to the Interpolation Volume framework and now functions similarly to the VolumetricFog settings
- Update of UI of cookie, CubeCookie, Reflection probe and planar reflection probe to combo box
### Bug fixes
- Fix ConvertPhysicalLightIntensityToLightIntensity() function used when creating light from script to match HDLightEditor behavior

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs


public static readonly CED.IDrawer[] Inspector;
public static readonly CED.IDrawer SectionPrimarySettings = CED.Group(
CED.Action(Drawer_ReflectionProbeMode),
CED.FadeGroup((s, p, o, i) => s.IsSectionExpandedMode((ReflectionProbeMode)i),
FadeOption.Indent,

static void Drawer_CaptureSettings(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
{
var renderPipelineAsset = (HDRenderPipelineAsset)GraphicsSettings.renderPipelineAsset;
p.resolution.intValue = renderPipelineAsset.GetRenderPipelineSettings().lightLoopSettings.reflectionCubemapSize;
p.resolution.intValue = (int)renderPipelineAsset.GetRenderPipelineSettings().lightLoopSettings.reflectionCubemapSize;
EditorGUILayout.LabelField(CoreEditorUtils.GetContent("Resolution"), CoreEditorUtils.GetContent(p.resolution.intValue.ToString()));
EditorGUILayout.PropertyField(p.shadowDistance, CoreEditorUtils.GetContent("Shadow Distance"));

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.cs


{
maxPlanarReflectionProbePerCamera = renderPipelineSettings.lightLoopSettings.planarReflectionProbeCacheSize,
maxActivePlanarReflectionProbe = 512,
planarReflectionProbeSize = renderPipelineSettings.lightLoopSettings.planarReflectionTextureSize
planarReflectionProbeSize = (int)renderPipelineSettings.lightLoopSettings.planarReflectionTextureSize
};
}
}

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/GlobalLightLoopSettings.cs


[Serializable]
public class GlobalLightLoopSettings
{
public int cookieSize = 128;
public CookieResolution cookieSize = CookieResolution.CookieResolution128;
public int pointCookieSize = 128;
public CubeCookieResolution pointCookieSize = CubeCookieResolution.CubeCookieResolution128;
public int planarReflectionTextureSize = 1024;
public PlanarReflectionResolution planarReflectionTextureSize = PlanarReflectionResolution.PlanarReflectionResolution1024;
public int reflectionCubemapSize = 128;
public CubeReflectionResolution reflectionCubemapSize = CubeReflectionResolution.CubeReflectionResolution128;
public bool reflectionCacheCompressed = false;
public bool planarReflectionCacheCompressed = false;
public SkyResolution skyReflectionSize = SkyResolution.SkyResolution256;

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs


GlobalLightLoopSettings gLightLoopSettings = hdAsset.GetRenderPipelineSettings().lightLoopSettings;
m_CookieTexArray = new TextureCache2D("Cookie");
m_CookieTexArray.AllocTextureArray(gLightLoopSettings.cookieTexArraySize, gLightLoopSettings.cookieSize, gLightLoopSettings.cookieSize, TextureFormat.RGBA32, true);
m_CookieTexArray.AllocTextureArray(gLightLoopSettings.cookieTexArraySize, (int)gLightLoopSettings.cookieSize, (int)gLightLoopSettings.cookieSize, TextureFormat.RGBA32, true);
m_CubeCookieTexArray.AllocTextureArray(gLightLoopSettings.cubeCookieTexArraySize, gLightLoopSettings.pointCookieSize, TextureFormat.RGBA32, true, m_CubeToPanoMaterial);
m_CubeCookieTexArray.AllocTextureArray(gLightLoopSettings.cubeCookieTexArraySize, (int)gLightLoopSettings.pointCookieSize, TextureFormat.RGBA32, true, m_CubeToPanoMaterial);
m_ReflectionProbeCache = new ReflectionProbeCache(hdAsset, iblFilterGGX, gLightLoopSettings.reflectionProbeCacheSize, gLightLoopSettings.reflectionCubemapSize, probeCacheFormat, true);
m_ReflectionProbeCache = new ReflectionProbeCache(hdAsset, iblFilterGGX, gLightLoopSettings.reflectionProbeCacheSize, (int)gLightLoopSettings.reflectionCubemapSize, probeCacheFormat, true);
m_ReflectionPlanarProbeCache = new PlanarReflectionProbeCache(hdAsset, iblFilterGGX, gLightLoopSettings.planarReflectionProbeCacheSize, gLightLoopSettings.planarReflectionTextureSize, planarProbeCacheFormat, true);
m_ReflectionPlanarProbeCache = new PlanarReflectionProbeCache(hdAsset, iblFilterGGX, gLightLoopSettings.planarReflectionProbeCacheSize, (int)gLightLoopSettings.planarReflectionTextureSize, planarProbeCacheFormat, true);
s_GenAABBKernel = buildScreenAABBShader.FindKernel("ScreenBoundsAABB");

51
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/SkyManager.cs


SkyResolution4096 = 4096
}
[Serializable]
public enum CubeReflectionResolution
{
CubeReflectionResolution128 = 128,
CubeReflectionResolution256 = 256,
CubeReflectionResolution512 = 512,
CubeReflectionResolution1024 = 1024,
CubeReflectionResolution2048 = 2048,
CubeReflectionResolution4096 = 4096
}
[Serializable]
public enum PlanarReflectionResolution
{
PlanarReflectionResolution64 = 64,
PlanarReflectionResolution128 = 128,
PlanarReflectionResolution256 = 256,
PlanarReflectionResolution512 = 512,
PlanarReflectionResolution1024 = 1024,
PlanarReflectionResolution2048 = 2048,
PlanarReflectionResolution4096 = 4096,
PlanarReflectionResolution8192 = 8192,
PlanarReflectionResolution16384 = 16384
}
[Serializable]
public enum CookieResolution
{
CookieResolution64 = 64,
CookieResolution128 = 128,
CookieResolution256 = 256,
CookieResolution512 = 512,
CookieResolution1024 = 1024,
CookieResolution2048 = 2048,
CookieResolution4096 = 4096,
CookieResolution8192 = 8192,
CookieResolution16384 = 16384
}
[Serializable]
public enum CubeCookieResolution
{
CubeCookieResolution64 = 64,
CubeCookieResolution128 = 128,
CubeCookieResolution256 = 256,
CubeCookieResolution512 = 512,
CubeCookieResolution1024 = 1024,
CubeCookieResolution2048 = 2048,
CubeCookieResolution4096 = 4096
}
public enum EnvironementUpdateMode
{
OnChanged = 0,

正在加载...
取消
保存