您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

26 行
1.3 KiB

using UnityEngine;
using System;
//-----------------------------------------------------------------------------
// Configuration
//-----------------------------------------------------------------------------
namespace UnityEngine.Experimental.Rendering.HDPipeline
{
[GenerateHLSL(PackingRules.Exact)]
public enum ShaderOptions
{
CameraRelativeRendering = 1, // Rendering sets the origin of the world to the position of the primary (scene view) camera
UseDisneySSS = 1 // Allow to chose between Burley Normalized Diffusion (Multi + Fix direction single scattering) or Jimenez diffusion approximation (Multiscattering only - More blurry) for Subsurface scattering
};
// Note: #define can't be use in include file in C# so we chose this way to configure both C# and hlsl
// Changing a value in this enum Config here require to regenerate the hlsl include and recompile C# and shaders
public class ShaderConfig
{
public const int k_CameraRelativeRendering = (int)ShaderOptions.CameraRelativeRendering;
public static int s_CameraRelativeRendering = (int)ShaderOptions.CameraRelativeRendering;
public const int k_UseDisneySSS = (int)ShaderOptions.UseDisneySSS;
public static int s_UseDisneySSS = (int)ShaderOptions.UseDisneySSS;
}
}