浏览代码

[PlanarReflection] Fixed realtime update for cache

/main
Frédéric Vauchelles 7 年前
当前提交
484b0b09
共有 3 个文件被更改,包括 21 次插入7 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/PlanarReflectionProbeEditor.cs
  2. 24
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/ReflectionSystemInternal.cs
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/RuntimeFilterIBL.cs

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/PlanarReflectionProbeEditor.cs


size.y);
if (m_PreviewedTextures[i] != null)
EditorGUI.DrawPreviewTexture(itemRect, m_PreviewedTextures[i], null, ScaleMode.ScaleToFit, 0, 1);
EditorGUI.DrawPreviewTexture(itemRect, m_PreviewedTextures[i], CameraEditorUtils.GUITextureBlit2SRGBMaterial, ScaleMode.ScaleToFit, 0, 1);
else
EditorGUI.LabelField(itemRect, _.GetContent("Not Available"));
}

24
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/ReflectionSystemInternal.cs


desc.width = m_Parameters.planarReflectionProbeSize;
desc.height = m_Parameters.planarReflectionProbeSize;
desc.colorFormat = RenderTextureFormat.ARGBHalf;
desc.useMipMap = true;
rt.name = "PlanarProbeRT " + probe.name;
return rt;
}

return renderTexture != null
&& renderTexture.width == m_Parameters.planarReflectionProbeSize
&& renderTexture.height == m_Parameters.planarReflectionProbeSize
&& renderTexture.format == RenderTextureFormat.ARGBHalf;
&& renderTexture.format == RenderTextureFormat.ARGBHalf
&& renderTexture.useMipMap;
}
public void RequestRealtimeRender(PlanarReflectionProbe probe)

renderCamera.camera.Render();
renderCamera.camera.targetTexture = null;
target.IncrementUpdateCount();
}
void SetProbeBoundsDirty(PlanarReflectionProbe planarProbe)

ctr.position = captureToWorld.GetColumn(3);
ctr.rotation = captureToWorld.rotation;
camera.fieldOfView = GetCaptureCameraFOVFor(probe, viewerCamera);
camera.aspect = 1;
camera.nearClipPlane = probe.captureNearPlane;
camera.farClipPlane = probe.captureFarPlane;
if (viewerCamera == null)
{
camera.fieldOfView = GetCaptureCameraFOVFor(probe, viewerCamera);
camera.aspect = 1;
camera.nearClipPlane = probe.captureNearPlane;
camera.farClipPlane = probe.captureFarPlane;
}
else
{
camera.fieldOfView = GetCaptureCameraFOVFor(probe, viewerCamera);
camera.aspect = 1;
camera.nearClipPlane = probe.captureNearPlane;
camera.farClipPlane = probe.captureFarPlane;
}
}
static HDCamera GetRenderHDCamera(PlanarReflectionProbe probe)

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/RuntimeFilterIBL.cs


public void FilterPlanarTexture(CommandBuffer cmd, Texture source, RenderTexture target)
{
// TODO: planar convolution
cmd.CopyTexture(source, target);
cmd.CopyTexture(source, 0, 0, target, 0, 0);
}
// Filters MIP map levels (other than 0) with GGX using multiple importance sampling.

正在加载...
取消
保存