浏览代码

[BC6H] Naming fixes

/main
Frédéric Vauchelles 7 年前
当前提交
47d56c30
共有 5 个文件被更改,包括 7 次插入8 次删除
  1. 3
      ScriptableRenderPipeline/Core/Resources/BC6H.compute
  2. 2
      ScriptableRenderPipeline/Core/ShaderLibrary/Fibonacci.hlsl
  3. 10
      ScriptableRenderPipeline/Core/ShaderLibrary/Sampling.hlsl
  4. 0
      /ScriptableRenderPipeline/Core/EncodeBC6H.cs
  5. 0
      /ScriptableRenderPipeline/Core/EncodeBC6H.cs.meta

3
ScriptableRenderPipeline/Core/Resources/BC6H.compute


#include "../ShaderLibrary/BC6H.hlsl"
#include "../ShaderLibrary/Common.hlsl"
#include "../ShaderLibrary/BC6H.hlsl"
#include "../ShaderLibrary/Sampling.hlsl"
TextureCube<float4> _Source;

2
ScriptableRenderPipeline/Core/ShaderLibrary/Fibonacci.hlsl


#ifndef UNITY_FIBONACCI_INCLUDED
#define UNITY_FIBONACCI_INCLUDED
#include "Common.hlsl"
// Computes a point using the Fibonacci sequence of length N.
// Input: Fib[N - 1], Fib[N - 2], and the index 'i' of the point.
// Ref: Efficient Quadrature Rules for Illumination Integrals

10
ScriptableRenderPipeline/Core/ShaderLibrary/Sampling.hlsl


}
// Convert a texel position into normalized position [-1..1]x[-1..1]
float2 CubemapTexelToNVC(uint2 unPositionTS, uint cubemapSize)
float2 CubemapTexelToNVC(uint2 unPositionTXS, uint cubemapSize)
return 2.0 * float2(unPositionTS) / float(max(cubemapSize - 1, 1)) - 1.0;
return 2.0 * float2(unPositionTXS) / float(max(cubemapSize - 1, 1)) - 1.0;
}
// Map cubemap face to world vector basis

};
// Convert a normalized cubemap face position into a direction
float3 CubemapTexelToDirection(float2 positionTS, uint faceId)
float3 CubemapTexelToDirection(float2 positionNVC, uint faceId)
float3 dir = CUBEMAP_FACE_BASIS_MAPPING[faceId][0] * positionTS.x
+ CUBEMAP_FACE_BASIS_MAPPING[faceId][1] * positionTS.y
float3 dir = CUBEMAP_FACE_BASIS_MAPPING[faceId][0] * positionNVC.x
+ CUBEMAP_FACE_BASIS_MAPPING[faceId][1] * positionNVC.y
+ CUBEMAP_FACE_BASIS_MAPPING[faceId][2];
return normalize(dir);

/ScriptableRenderPipeline/Core/BC6H.cs → /ScriptableRenderPipeline/Core/EncodeBC6H.cs

/ScriptableRenderPipeline/Core/BC6H.cs.meta → /ScriptableRenderPipeline/Core/EncodeBC6H.cs.meta

正在加载...
取消
保存