浏览代码

Added color and depth buffers to the builtin sky parameters.

/main
Julien Ignace 8 年前
当前提交
8f84aa6a
共有 1 个文件被更改,包括 12 次插入6 次删除
  1. 18
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs

18
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs


public class BuiltinSkyParameters
{
public Matrix4x4 viewProjMatrix;
public Matrix4x4 invViewProjMatrix;
public Vector4 screenSize;
public Mesh skyMesh;
public RenderLoop renderLoop;
public Light sunLight;
public Matrix4x4 viewProjMatrix;
public Matrix4x4 invViewProjMatrix;
public Vector4 screenSize;
public Mesh skyMesh;
public RenderLoop renderLoop;
public Light sunLight;
public RenderTargetIdentifier colorBuffer;
public RenderTargetIdentifier depthBuffer;
}
public class SkyManager

builtinParams.viewProjMatrix = m_faceCameraViewProjectionMatrix[i];
builtinParams.screenSize = m_CubemapScreenSize;
builtinParams.skyMesh = m_CubemapFaceMesh[i];
builtinParams.colorBuffer = target;
builtinParams.depthBuffer = new RenderTargetIdentifier();
m_Renderer.RenderSky(builtinParams, skyParameters);
}
}

m_BuiltinParameters.viewProjMatrix = camera.viewProjectionMatrix;
m_BuiltinParameters.screenSize = camera.screenSize;
m_BuiltinParameters.skyMesh = BuildSkyMesh(camera.camera.GetComponent<Transform>().position, m_BuiltinParameters.invViewProjMatrix, false);
m_BuiltinParameters.colorBuffer = colorBuffer;
m_BuiltinParameters.depthBuffer = depthBuffer;
Utilities.SetRenderTarget(renderLoop, colorBuffer, depthBuffer);
m_Renderer.RenderSky(m_BuiltinParameters, skyParameters);

正在加载...
取消
保存