Evgenii Golubev
7 年前
当前提交
69dfe3f6
共有 8 个文件被更改,包括 114 次插入 和 41 次删除
-
1ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDStringConstants.cs
-
8ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs
-
27ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.cs
-
1ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.cs.hlsl
-
62ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl
-
14ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/VisualEnvironment.cs
-
31ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/VolumetricFog.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/AtmosphericScattering/VolumetricFog.cs.meta
|
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class VolumetricFog : AtmosphericScattering |
|||
{ |
|||
private readonly static int m_ExpFogParam = Shader.PropertyToID("_ExpFogParameters"); |
|||
|
|||
public ColorParameter albedo = new ColorParameter(new Color(0.5f, 0.5f, 0.5f)); |
|||
|
|||
// Note: mean free path is a non-linear function of density.
|
|||
// You want to interpolate the ExtinctionCoefficient = 1 / MeanFreePath.
|
|||
public ClampedFloatParameter meanFreePath = new ClampedFloatParameter(10.0f, 0, 1000000); |
|||
|
|||
public ClampedFloatParameter asymmetry = new ClampedFloatParameter(0.0f, -1, 1); |
|||
|
|||
public override void PushShaderParameters(CommandBuffer cmd, FrameSettings frameSettings) |
|||
{ |
|||
cmd.SetGlobalInt(HDShaderIDs._AtmosphericScatteringType, (int)FogType.Volumetric); |
|||
|
|||
// cmd.SetGlobalVector(HDShaderIDs._GlobalScattering, properties.scattering);
|
|||
// cmd.SetGlobalFloat( HDShaderIDs._GlobalExtinction, properties.extinction);
|
|||
// cmd.SetGlobalFloat( HDShaderIDs._GlobalAsymmetry, properties.asymmetry);
|
|||
} |
|||
} |
|||
|
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 29b00527f85bb3346a4d2cb710971587 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue