|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// Return true if BakedShadowMask are enabled
|
|
|
|
public bool PrepareLightsForGPU(CommandBuffer cmd, ShadowSettings shadowSettings, CullResults cullResults, ReflectionProbeCullResults reflectionProbeCullResults, Camera camera, FrameSettings frameSettings) |
|
|
|
public bool PrepareLightsForGPU(CommandBuffer cmd, ShadowSettings shadowSettings, CullResults cullResults, ReflectionProbeCullResults reflectionProbeCullResults, Camera camera) |
|
|
|
{ |
|
|
|
using (new ProfilingSample(cmd, "Prepare Lights For GPU")) |
|
|
|
{ |
|
|
|
|
|
|
cmd.DispatchCompute(buildPerVoxelLightListShader, s_GenListPerVoxelKernel, numTilesX, numTilesY, 1); |
|
|
|
} |
|
|
|
|
|
|
|
public void BuildGPULightListsCommon(HDCamera hdCamera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled, FrameSettings frameSettings) |
|
|
|
public void BuildGPULightListsCommon(HDCamera hdCamera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled) |
|
|
|
{ |
|
|
|
var camera = hdCamera.camera; |
|
|
|
cmd.BeginSample("Build Light List"); |
|
|
|
|
|
|
var projArr = new Matrix4x4[2]; |
|
|
|
var projscrArr = new Matrix4x4[2]; |
|
|
|
var invProjscrArr = new Matrix4x4[2]; |
|
|
|
if (frameSettings.enableStereo) |
|
|
|
if (m_FrameSettings.enableStereo) |
|
|
|
{ |
|
|
|
for (int eyeIndex = 0; eyeIndex < 2; eyeIndex++) |
|
|
|
{ |
|
|
|
|
|
|
cmd.EndSample("Build Light List"); |
|
|
|
} |
|
|
|
|
|
|
|
public void BuildGPULightLists(HDCamera hdCamera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled, FrameSettings frameSettings) |
|
|
|
public void BuildGPULightLists(HDCamera hdCamera, CommandBuffer cmd, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, bool skyEnabled) |
|
|
|
BuildGPULightListsCommon(hdCamera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled, frameSettings); |
|
|
|
BuildGPULightListsCommon(hdCamera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled); |
|
|
|
public GPUFence BuildGPULightListsAsyncBegin(HDCamera hdCamera, ScriptableRenderContext renderContext, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, GPUFence startFence, bool skyEnabled, FrameSettings frameSettings) |
|
|
|
public GPUFence BuildGPULightListsAsyncBegin(HDCamera hdCamera, ScriptableRenderContext renderContext, RenderTargetIdentifier cameraDepthBufferRT, RenderTargetIdentifier stencilTextureRT, GPUFence startFence, bool skyEnabled) |
|
|
|
BuildGPULightListsCommon(hdCamera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled, frameSettings); |
|
|
|
BuildGPULightListsCommon(hdCamera, cmd, cameraDepthBufferRT, stencilTextureRT, skyEnabled); |
|
|
|
GPUFence completeFence = cmd.CreateGPUFence(); |
|
|
|
renderContext.ExecuteCommandBufferAsync(cmd, ComputeQueueType.Background); |
|
|
|
CommandBufferPool.Release(cmd); |
|
|
|