浏览代码

Update GI baking

/main
sebastienlagarde 6 年前
当前提交
da640b25
共有 2 个文件被更改,包括 11 次插入4 次删除
  1. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
  2. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/GlobalIlluminationUtils.cs

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


#if UNITY_EDITOR
SceneViewDrawMode.SetupDrawMode();
if (UnityEditor.PlayerSettings.colorSpace == ColorSpace.Gamma)
{
Debug.LogError("High Definition Render Pipeline doesn't support Gamma mode, change to Linear mode");
}
#endif
}

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/GlobalIlluminationUtils.cs


ld.coneAngle = 0.0f;
ld.innerConeAngle = 0.0f;
#if UNITY_EDITOR
ld.shape0 = l.shadows == LightShadows.Soft ? (Mathf.Deg2Rad * l.shadowAngle) : 0.0f;
ld.shape0 = l.shadows != LightShadows.None ? (Mathf.Deg2Rad * l.shadowAngle) : 0.0f;
#else
ld.shape0 = 0.0f;
#endif

ld.coneAngle = l.spotAngle * Mathf.Deg2Rad; // coneAngle is the full angle
ld.innerConeAngle = l.spotAngle * Mathf.Deg2Rad * add.GetInnerSpotPercent01();
#if UNITY_EDITOR
ld.shape0 = l.shadows == LightShadows.Soft ? l.shadowRadius : 0.0f;
ld.shape0 = l.shadows != LightShadows.None ? l.shadowRadius : 0.0f;
#else
ld.shape0 = 0.0f;
#endif

ld.innerConeAngle = 0.0f;
#if UNITY_EDITOR
ld.shape0 = l.shadows == LightShadows.Soft ? l.shadowRadius : 0.0f;
ld.shape0 = l.shadows != LightShadows.None ? l.shadowRadius : 0.0f;
#else
ld.shape0 = 0.0f;
#endif

ld.shape0 = 0.0f;
ld.shape1 = 0.0f;
#endif
ld.type = UnityEngine.Experimental.GlobalIllumination.LightType.Rectangle;
// TEMP: for now, if we bake a rectangle type this will disable the light for runtime, need to speak with GI team about it!
// ld.type = UnityEngine.Experimental.GlobalIllumination.LightType.Rectangle;
ld.type = UnityEngine.Experimental.GlobalIllumination.LightType.Point;
ld.falloff = add.applyRangeAttenuation ? FalloffType.InverseSquared : FalloffType.InverseSquaredNoRangeAttenuation;
}
else if (add.lightTypeExtent == LightTypeExtent.Line)

正在加载...
取消
保存