浏览代码

Rename to follow convention

/main
Evgenii Golubev 7 年前
当前提交
2bf107d2
共有 5 个文件被更改,包括 14 次插入14 次删除
  1. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDStringConstants.cs
  2. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightEvaluation.hlsl
  3. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/Resources/VolumetricLighting.compute
  4. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs
  5. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderVariables.hlsl

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDStringConstants.cs


public static readonly int _Result1 = Shader.PropertyToID("_Result1");
public static readonly int _AmbientProbeCoeffs = Shader.PropertyToID("_AmbientProbeCoeffs");
public static readonly int _Global_Extinction = Shader.PropertyToID("_Global_Extinction");
public static readonly int _Global_Scattering = Shader.PropertyToID("_Global_Scattering");
public static readonly int _Global_Asymmetry = Shader.PropertyToID("_Global_Asymmetry");
public static readonly int _GlobalExtinction = Shader.PropertyToID("_GlobalExtinction");
public static readonly int _GlobalScattering = Shader.PropertyToID("_GlobalScattering");
public static readonly int _GlobalAsymmetry = Shader.PropertyToID("_GlobalAsymmetry");
public static readonly int _CornetteShanksConstant = Shader.PropertyToID("_CornetteShanksConstant");
public static readonly int _VBufferResolution = Shader.PropertyToID("_VBufferResolution");
public static readonly int _VBufferSliceCount = Shader.PropertyToID("_VBufferSliceCount");

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightEvaluation.hlsl


#if (SHADEROPTIONS_VOLUMETRIC_LIGHTING_PRESET != 0)
float distVol = (lightData.lightType == GPULIGHTTYPE_PROJECTOR_BOX) ? distances.w : distances.x;
attenuation *= TransmittanceHomogeneousMedium(_Global_Extinction, distVol);
attenuation *= TransmittanceHomogeneousMedium(_GlobalExtinction, distVol);
#endif
// Projector lights always have cookies, so we can perform clipping inside the if().

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/Resources/VolumetricLighting.compute


CBUFFER_START(UnityVolumetricLighting)
float4 _VBufferSampleOffset; // {x, y, z}, w = rendered frame count
float4x4 _VBufferCoordToViewDirWS; // Actually just 3x3, but Unity can only set 4x4
float _CornetteShanksConstant; // CornetteShanksPhasePartConstant(_Global_Asymmetry)
float _CornetteShanksConstant; // CornetteShanksPhasePartConstant(_GlobalAsymmetry)
CBUFFER_END
//--------------------------------------------------------------------------------------------------

// Sample the participating medium at 'tc' (or 'centerWS').
// We consider it to be constant along the interval [t0, t1] (within the voxel).
// TODO: piecewise linear.
float3 scattering = _Global_Scattering;
float extinction = max(_Global_Extinction, FLT_MIN); // Avoid NaNs
float asymmetry = _Global_Asymmetry;
float3 scattering = _GlobalScattering;
float extinction = max(_GlobalExtinction, FLT_MIN); // Avoid NaNs
float asymmetry = _GlobalAsymmetry;
// TODO: define a function ComputeGlobalFogCoefficients(float3 centerWS),
// which allows procedural definition of extinction and scattering.

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs


: VolumeProperties.GetNeutralVolumeProperties();
float asymmetry = globalVolume != null ? globalVolume.volumeParameters.asymmetry : 0;
cmd.SetGlobalVector(HDShaderIDs._Global_Scattering, globalVolumeProperties.scattering);
cmd.SetGlobalFloat( HDShaderIDs._Global_Extinction, globalVolumeProperties.extinction);
cmd.SetGlobalFloat( HDShaderIDs._Global_Asymmetry, asymmetry);
cmd.SetGlobalVector(HDShaderIDs._GlobalScattering, globalVolumeProperties.scattering);
cmd.SetGlobalFloat( HDShaderIDs._GlobalExtinction, globalVolumeProperties.extinction);
cmd.SetGlobalFloat( HDShaderIDs._GlobalAsymmetry, asymmetry);
int w = 0, h = 0, d = 0;
ComputeVBufferResolutionAndScale(preset, (int)camera.screenSize.x, (int)camera.screenSize.y, ref w, ref h, ref d);

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/ShaderVariables.hlsl


uint _TaaFrameIndex; // [0, 7]
// Volumetric lighting.
float4 _AmbientProbeCoeffs[7]; // 3 bands of SH, packed, rescaled and convolved with the phase function
float _Global_Asymmetry;
float3 _Global_Scattering;
float _Global_Extinction;
float _GlobalAsymmetry;
float3 _GlobalScattering;
float _GlobalExtinction;
float4 _VBufferResolution; // { w, h, 1/w, 1/h }
float4 _VBufferSliceCount; // { count, 1/count, 0, 0 }
float4 _VBufferDepthEncodingParams; // See the call site for description

正在加载...
取消
保存