浏览代码

Remove "unsafe"

/main
Evgenii Golubev 7 年前
当前提交
7783b967
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 16
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs

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


return depthParams;
}
public unsafe struct ZonalHarmonicsL2
public struct ZonalHarmonicsL2
public fixed float coeffs[3];
public float[] coeffs;
public static unsafe ZonalHarmonicsL2 GetHenyeyGreensteinPhaseFunction(float asymmetry)
public static ZonalHarmonicsL2 GetHenyeyGreensteinPhaseFunction(float asymmetry)
ZonalHarmonicsL2 zh = new ZonalHarmonicsL2();
var zh = new ZonalHarmonicsL2();
zh.coeffs = new float[3];
zh.coeffs[0] = 0.5f * Mathf.Sqrt(1.0f / Mathf.PI);
zh.coeffs[1] = 0.5f * Mathf.Sqrt(3.0f / Mathf.PI) * g;

}
public static unsafe ZonalHarmonicsL2 GetCornetteShanksPhaseFunction(float asymmetry)
public static ZonalHarmonicsL2 GetCornetteShanksPhaseFunction(float asymmetry)
ZonalHarmonicsL2 zh = new ZonalHarmonicsL2();
var zh = new ZonalHarmonicsL2();
zh.coeffs = new float[3];
zh.coeffs[0] = 0.282095f;
zh.coeffs[1] = 0.293162f * g * (4.0f + (g * g)) / (2.0f + (g * g));

}
// Ref: "Stupid Spherical Harmonics Tricks", p. 6.
public static unsafe SphericalHarmonicsL2 Convolve(SphericalHarmonicsL2 sh, ZonalHarmonicsL2 zh)
public static SphericalHarmonicsL2 Convolve(SphericalHarmonicsL2 sh, ZonalHarmonicsL2 zh)
{
for (int l = 0; l <= 2; l++)
{

正在加载...
取消
保存