浏览代码

Changed HDRI lux step value

/main
Antoine Lelievre 6 年前
当前提交
3abc702e
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs
  2. 4
      com.unity.render-pipelines.high-definition/HDRP/Sky/HDRISky/IntegrateHDRISky.shader

4
com.unity.render-pipelines.high-definition/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs


public void GetUpperHemisphereLuxValue()
{
Cubemap hdri = m_hdriSky.value.objectReferenceValue as Cubemap;
HDRISky sky = target as HDRISky;
if (hdri == null)
return;
float omegaP = (Mathf.PI * 4) / (6.0f * hdri.width * hdri.width);
m_IntegrateHDRISkyMaterial.SetTexture(HDShaderIDs._Cubemap, hdri);

4
com.unity.render-pipelines.high-definition/HDRP/Sky/HDRISky/IntegrateHDRISky.shader


real GetUpperHemisphereLuxValue(TEXTURECUBE_ARGS(skybox, sampler_skybox), real3 N, uint sampleCount = 16384)
{
float sum = 0.0;
float dphi = 0.002;
float dtheta = 0.002;
float dphi = 0.005;
float dtheta = 0.005;
for (float phi = 0; phi < 2.0 * PI; phi += dphi)
{
for (float theta = 0; theta < PI / 2.0; theta += dtheta)

正在加载...
取消
保存