sebastienlagarde
8 年前
当前提交
a333a206
共有 8 个文件被更改,包括 34 次插入 和 77 次删除
-
27Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
-
2Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/DisneyGGX.shader
-
4Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/Lighting.hlsl
-
29Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/LightingDeferred.hlsl
-
12Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/LightingDeferred.shader
-
3Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/TemplateDisneyGGX.hlsl
-
30Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl
-
4Assets/ScriptableRenderLoop/fptl/Internal-DeferredReflections.shader
|
|||
#ifndef UNITY_LIGHTING_DEFERRED_INCLUDED |
|||
#define UNITY_LIGHTING_DEFERRED_INCLUDED |
|||
|
|||
//----------------------------------------------------------------------------- |
|||
// Simple deferred loop architecture |
|||
//----------------------------------------------------------------------------- |
|||
|
|||
StructuredBuffer<PunctualLightData> g_punctualLightList; |
|||
int g_punctualLightCount; |
|||
|
|||
// Currently just a copy/paste of forward ligthing as it is just for validation |
|||
void DeferredLighting(float3 V, float3 positionWS, BSDFData material, |
|||
out float4 diffuseLighting, |
|||
out float4 specularLighting) |
|||
{ |
|||
diffuseLighting = float4(0.0, 0.0, 0.0, 0.0); |
|||
specularLighting = float4(0.0, 0.0, 0.0, 0.0); |
|||
|
|||
for (int i = 0; i < g_punctualLightCount; ++i) |
|||
{ |
|||
float4 localDiffuseLighting; |
|||
float4 localSpecularLighting; |
|||
EvaluateBSDF_Punctual(V, positionWS, g_punctualLightList[i], material, localDiffuseLighting, localSpecularLighting); |
|||
diffuseLighting += localDiffuseLighting; |
|||
specularLighting += localSpecularLighting; |
|||
} |
|||
} |
|||
|
|||
#endif |
撰写
预览
正在加载...
取消
保存
Reference in new issue