浏览代码

HDRenderPipeline: Change area light data to public so they can be access by external class

/fptl_cleanup
sebastienlagarde 8 年前
当前提交
6f9ae514
共有 3 个文件被更改,包括 7 次插入9 次删除
  1. 4
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
  2. 4
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LtcData.DisneyDiffuse.cs
  3. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LtcData.GGX.cs

4
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


//-----------------------------------------------------------------------------
// SurfaceData is define in Lit.cs which generate Lit.cs.hlsl
//TODO: return this original relative path include after fixing a bug in Unity side
//#include "Lit.cs.hlsl"
#include "../../Material/Lit/Lit.cs.hlsl"
#include "Lit.cs.hlsl"
// In case we pack data uint16 buffer we need to change the output render target format to uint16
// TODO: Is there a way to automate these output type based on the format declare in lit.cs ?

4
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LtcData.DisneyDiffuse.cs


{
public partial class RenderLoop : Object
{
static double[,] s_LtcDisneyDiffuseMatrixData = new double[k_LtcLUTResolution * k_LtcLUTResolution, k_LtcLUTMatrixDim * k_LtcLUTMatrixDim]
public static double[,] s_LtcDisneyDiffuseMatrixData = new double[k_LtcLUTResolution * k_LtcLUTResolution, k_LtcLUTMatrixDim * k_LtcLUTMatrixDim]
{
{1.018309, 0, 0.000000, 0, 1.018309, 0, 0.000000, 0, 1},
{1.018309, 0, 0.000000, 0, 1.018309, 0, 0.000000, 0, 1},

{1.106979, 0, 0.286686, 0, 1.061540, 0, -0.391058, 0, 1}
};
static float[] s_LtcDisneyDiffuseMagnitudeData = new float[k_LtcLUTResolution * k_LtcLUTResolution]
public static float[] s_LtcDisneyDiffuseMagnitudeData = new float[k_LtcLUTResolution * k_LtcLUTResolution]
{
0.978932f,
0.978932f,

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LtcData.GGX.cs


using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering;
using System;

// This table is precomputed for squared roughness and normalized so that last entry
// is 1 and thus does not need to be store in a texture.
static double[,] s_LtcGGXMatrixData = new double[k_LtcLUTResolution * k_LtcLUTResolution, k_LtcLUTMatrixDim * k_LtcLUTMatrixDim]
public static double[,] s_LtcGGXMatrixData = new double[k_LtcLUTResolution * k_LtcLUTResolution, k_LtcLUTMatrixDim * k_LtcLUTMatrixDim]
{
{499.999756, 0, 0.000000, 0, 499.999756, 0, 0.000000, 0, 1},
{499.999756, 0, 0.000000, 0, 499.999756, 0, 0.000000, 0, 1},

{0.609037, 0, -0.053470, 0, 0.607151, 0, 0.031450, 0, 1}
};
static float[] s_LtcGGXMagnitudeData = new float[k_LtcLUTResolution * k_LtcLUTResolution]
public static float[] s_LtcGGXMagnitudeData = new float[k_LtcLUTResolution * k_LtcLUTResolution]
{
1.000000f,
1.000000f,

0.887423f
};
static float[] s_LtcGGXFresnelData = new float[k_LtcLUTResolution * k_LtcLUTResolution]
public static float[] s_LtcGGXFresnelData = new float[k_LtcLUTResolution * k_LtcLUTResolution]
{
0.000000f,
0.000000f,

正在加载...
取消
保存