浏览代码

update refraction to use float3 for position

/feature-ReflectionProbeFit
sebastienlagarde 7 年前
当前提交
5db7764e
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Refraction.hlsl

6
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Refraction.hlsl


struct RefractionModelResult
{
real dist; // length of the transmission during refraction through the shape
real3 positionWS; // out ray position
float3 positionWS; // out ray position
RefractionModelResult RefractionModelSphere(real3 V, real3 positionWS, real3 normalWS, real ior, real thickness)
RefractionModelResult RefractionModelSphere(real3 V, float3 positionWS, real3 normalWS, real ior, real thickness)
{
// Sphere shape model:
// We approximate locally the shape of the object as sphere, that is tangent to the shape.

return result;
}
RefractionModelResult RefractionModelPlane(real3 V, real3 positionWS, real3 normalWS, real ior, real thickness)
RefractionModelResult RefractionModelPlane(real3 V, float3 positionWS, real3 normalWS, real ior, real thickness)
{
// Plane shape model:
// We approximate locally the shape of the object as a plane with normal {normalWS} at {positionWS}

正在加载...
取消
保存