浏览代码

Make 'AreaLightData.twoSided' a bool

/main
Evgenii Golubev 8 年前
当前提交
5116a0d4
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
  2. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs
  3. 4
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs.hlsl

2
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


// TODO: add AreaShapeType.Line support for small widths.
lightData.shapeType = AreaShapeType.Rectangle;
lightData.size = new Vector2(additionalData.areaLightLength, additionalData.areaLightWidth);
lightData.twoSided = additionalData.isDoubleSided ? 1.0f : 0.0f;
lightData.twoSided = additionalData.isDoubleSided;
lightData.positionWS = light.light.transform.position;
lightData.forward = light.light.transform.forward; // Note: Light direction is oriented backward (-Z)

2
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs


public float shadowDimmer;
public Vector2 size;
public float twoSided;
public bool twoSided;
public float unused;
};

4
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs.hlsl


float3 right;
float shadowDimmer;
float2 size;
float twoSided;
bool twoSided;
float unused;
};

{
return value.size;
}
float GetTwoSided(AreaLightData value)
bool GetTwoSided(AreaLightData value)
{
return value.twoSided;
}

正在加载...
取消
保存