浏览代码

Set dynamic uniforms in OnEnable()

/main
Evgenii Golubev 8 年前
当前提交
cd304047
共有 1 个文件被更改,包括 13 次插入3 次删除
  1. 16
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/AtmosphericParameters.cs

16
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/AtmosphericParameters.cs


// Define select preprocessor symbols.
UpdateKeywords(true);
if (depthTexture == DepthTexture.Disable)
{
// Disable depth texture rendering.
Camera.current.depthTextureMode = DepthTextureMode.None;
}
UpdateDynamicUniforms();
if (instance && instance != this)
{

void OnWillRenderObject()
{
/*
/* For now, we only use the directional light we are attached to, and the current camera. */
// For now, we only use the directional light we are attached to, and the current camera.
if (depthTexture == DepthTexture.Disable)
{

// Set shader constants.
UpdateDynamicUniforms();
/*
if(useOcclusion) {
if (useOcclusion) {
var camRgt = m_currentCamera.transform.right;
var camUp = m_currentCamera.transform.up;
var camFwd = m_currentCamera.transform.forward;

void UpdateDynamicUniforms()
{
/* For now, we only use the directional light we are attached to, and the current camera. */
var trackedYaw = skyDomeTrackedYawRotation ? skyDomeTrackedYawRotation.eulerAngles.y : 0f;
Shader.SetGlobalMatrix("_SkyDomeRotation",
Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(skyDomeRotation.x, 0f, 0f), Vector3.one)

正在加载...
取消
保存