|
|
|
|
|
|
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) |
|
|
|