|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using UnityEngine.Rendering; |
|
|
|
|
|
|
|
namespace UnityEngine.Experimental.Rendering.HDPipeline.Internal |
|
|
|
|
|
|
// -FLT_MAX in hlsl
|
|
|
|
static readonly Color k_DiscardedColor = new Color(1000, 1000, 1000, 1000); |
|
|
|
|
|
|
|
static Camera s_RenderCamera = null; |
|
|
|
static HDAdditionalCameraData s_RenderCameraData; |
|
|
|
|
|
|
|
|
|
|
camera.fieldOfView = fov; |
|
|
|
camera.aspect = aspect; |
|
|
|
camera.clearFlags = clearFlags; |
|
|
|
camera.backgroundColor = backgroundColor; |
|
|
|
// TODO: Find a cleaner way to discard pixel out of frustrum
|
|
|
|
camera.backgroundColor = k_DiscardedColor; |
|
|
|
camera.projectionMatrix = projection; |
|
|
|
camera.worldToCameraMatrix = worldToCamera; |
|
|
|
|
|
|
|