浏览代码

Added support to pipeline rendering features.

/feature-ReflectionProbeFit
Felipe Lira 7 年前
当前提交
913c6f83
共有 1 个文件被更改,包括 20 次插入4 次删除
  1. 24
      ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs

24
ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs


m_Asset = asset;
BuildShadowSettings();
SetRenderingFeatures();
GraphicsSettings.lightsUseLinearIntensity = true;
PerFrameBuffer._GlossyEnvironmentColor = Shader.PropertyToID("_GlossyEnvironmentColor");
PerFrameBuffer._SubtractiveShadowColor = Shader.PropertyToID("_SubtractiveShadowColor");

CoreUtils.Destroy(m_BlitMaterial);
}
private void SetRenderingFeatures()
{
#if UNITY_EDITOR
SupportedRenderingFeatures.active = new SupportedRenderingFeatures()
{
reflectionProbeSupportFlags = SupportedRenderingFeatures.ReflectionProbeSupportFlags.None,
defaultMixedLightingMode = SupportedRenderingFeatures.LightmapMixedBakeMode.Subtractive,
supportedMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeMode.Subtractive,
supportedLightmapBakeTypes = LightmapBakeType.Baked | LightmapBakeType.Mixed,
supportedLightmapsModes = LightmapsMode.CombinedDirectional | LightmapsMode.NonDirectional,
rendererSupportsLightProbeProxyVolumes = false,
rendererSupportsMotionVectors = false,
rendererSupportsReceiveShadows = true,
rendererSupportsReflectionProbes = true
};
#endif
}
// TODO: This is at the moment required for all pipes. We should not implicitly change user project settings
// instead this should be forced when using SRP, since all SRP use linear lighting.
GraphicsSettings.lightsUseLinearIntensity = true;
SetupPerFrameShaderConstants();

正在加载...
取消
保存