|
|
|
|
|
|
// Discard variations lesser than kRenderScaleThreshold.
|
|
|
|
// Scale is only enabled for gameview.
|
|
|
|
// In XR mode, grab renderScale from XRSettings instead of SRP asset for now.
|
|
|
|
// This is just a temporary change pending full integration of XR with SRP
|
|
|
|
// This is just a temporary change pending full integration of XR with SRP
|
|
|
|
|
|
|
|
if (camera.cameraType == CameraType.Game) |
|
|
|
{ |
|
|
|
|
|
|
} else { |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
} else { |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
cameraData.requiresDepthTexture = pipelineAsset.supportsCameraDepthTexture || cameraData.postProcessEnabled || cameraData.isSceneViewCamera; |
|
|
|
cameraData.requiresDepthTexture = pipelineAsset.supportsCameraDepthTexture || cameraData.isSceneViewCamera; |
|
|
|
cameraData.requiresSoftParticles = pipelineAsset.supportsSoftParticles; |
|
|
|
cameraData.requiresOpaqueTexture = pipelineAsset.supportsCameraOpaqueTexture; |
|
|
|
cameraData.opaqueTextureDownsampling = pipelineAsset.opaqueDownsampling; |
|
|
|
|
|
|
|
|
|
|
LightweightAdditionalCameraData additionalCameraData = camera.gameObject.GetComponent<LightweightAdditionalCameraData>(); |
|
|
|
if (additionalCameraData != null) |
|
|
|
{ |
|
|
|
cameraData.maxShadowDistance = (additionalCameraData.renderShadows) ? cameraData.maxShadowDistance : 0.0f; |
|
|
|
cameraData.requiresDepthTexture &= additionalCameraData.requiresDepthTexture; |
|
|
|
cameraData.requiresOpaqueTexture &= additionalCameraData.requiresColorTexture; |
|
|
|
} |
|
|
|
else if (!cameraData.isSceneViewCamera && camera.cameraType != CameraType.Reflection && camera.cameraType != CameraType.Preview) |
|
|
|
{ |
|
|
|
cameraData.requiresDepthTexture = false; |
|
|
|
cameraData.requiresOpaqueTexture = false; |
|
|
|
} |
|
|
|
|
|
|
|
cameraData.requiresDepthTexture |= cameraData.postProcessEnabled; |
|
|
|
} |
|
|
|
|
|
|
|
void InitializeRenderingData(ref CameraData cameraData, List<VisibleLight> visibleLights, int maxSupportedLocalLightsPerPass, int maxSupportedVertexLights, out RenderingData renderingData) |
|
|
|