浏览代码

switched HDRenderLoop over to generated .hlsl

/main
vlad-andreev 8 年前
当前提交
81aa39a3
共有 4 个文件被更改,包括 144 次插入15 次删除
  1. 23
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs
  2. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Material.hlsl
  3. 125
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs.hlsl
  4. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs.hlsl.meta

23
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs


// Note: This file is included both in C# code and in hlsl code, avoiding duplication
#if !__HLSL
#endif
// These structures share between C# and hlsl need to be align on float4, so we pad them.
struct PunctualLightData
// These structures share between C# and hlsl need to be align on float4, so we pad them.
[GenerateHLSL]
public struct PunctualLightData
{
public Vec3 positionWS;
public float invSqrAttenuationRadius;

public Vec2 unused2;
};
struct AreaLightData
[GenerateHLSL]
public struct AreaLightData
struct EnvLightData
[GenerateHLSL]
public struct EnvLightData
struct PlanarLightData
[GenerateHLSL]
public struct PlanarLightData
#if !__HLSL
#endif

2
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Material.hlsl


#include "Assets/ScriptableRenderLoop/ShaderLibrary/BSDF.hlsl"
#include "Assets/ScriptableRenderLoop/ShaderLibrary/CommonLighting.hlsl"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs"
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs.hlsl"
#include "CommonMaterial.hlsl"
// Here we include all the different lighting model supported by the renderloop based on define done in .shader

125
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs.hlsl


//
// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs. Please don't edit by hand.
//
// Generated from UnityEngine.ScriptableRenderLoop.PunctualLightData
// PackingRules = Exact
struct PunctualLightData
{
float3 positionWS; // x: x y: y z: z
float invSqrAttenuationRadius;
float3 color; // x: x y: y z: z
float useDistanceAttenuation;
float3 forward; // x: x y: y z: z
float diffuseScale;
float3 up; // x: x y: y z: z
float specularScale;
float3 right; // x: x y: y z: z
float shadowDimmer;
float angleScale;
float angleOffset;
float2 unused2; // x: x y: y
};
// Generated from UnityEngine.ScriptableRenderLoop.AreaLightData
// PackingRules = Exact
struct AreaLightData
{
float3 positionWS; // x: x y: y z: z
};
// Generated from UnityEngine.ScriptableRenderLoop.EnvLightData
// PackingRules = Exact
struct EnvLightData
{
float3 positionWS; // x: x y: y z: z
};
// Generated from UnityEngine.ScriptableRenderLoop.PlanarLightData
// PackingRules = Exact
struct PlanarLightData
{
float3 positionWS; // x: x y: y z: z
};
//
// Accessors for UnityEngine.ScriptableRenderLoop.PunctualLightData
//
float3 GetPositionWS(PunctualLightData value)
{
return value.positionWS;
}
float GetInvSqrAttenuationRadius(PunctualLightData value)
{
return value.invSqrAttenuationRadius;
}
float3 GetColor(PunctualLightData value)
{
return value.color;
}
float GetUseDistanceAttenuation(PunctualLightData value)
{
return value.useDistanceAttenuation;
}
float3 GetForward(PunctualLightData value)
{
return value.forward;
}
float GetDiffuseScale(PunctualLightData value)
{
return value.diffuseScale;
}
float3 GetUp(PunctualLightData value)
{
return value.up;
}
float GetSpecularScale(PunctualLightData value)
{
return value.specularScale;
}
float3 GetRight(PunctualLightData value)
{
return value.right;
}
float GetShadowDimmer(PunctualLightData value)
{
return value.shadowDimmer;
}
float GetAngleScale(PunctualLightData value)
{
return value.angleScale;
}
float GetAngleOffset(PunctualLightData value)
{
return value.angleOffset;
}
float2 GetUnused2(PunctualLightData value)
{
return value.unused2;
}
//
// Accessors for UnityEngine.ScriptableRenderLoop.AreaLightData
//
float3 GetPositionWS(AreaLightData value)
{
return value.positionWS;
}
//
// Accessors for UnityEngine.ScriptableRenderLoop.EnvLightData
//
float3 GetPositionWS(EnvLightData value)
{
return value.positionWS;
}
//
// Accessors for UnityEngine.ScriptableRenderLoop.PlanarLightData
//
float3 GetPositionWS(PlanarLightData value)
{
return value.positionWS;
}

9
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/LightDefinition.cs.hlsl.meta


fileFormatVersion: 2
guid: ff58597e731e7d5419b41b73325ddb47
timeCreated: 1475681650
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存