sebastienlagarde
8 年前
当前提交
94bea850
共有 10 个文件被更改,包括 197 次插入 和 26 次删除
-
73Assets/ScriptableRenderLoop/fptl/FptlLighting.cs
-
2Assets/ScriptableRenderLoop/fptl/Internal-DeferredReflections.shader
-
2Assets/ScriptableRenderLoop/fptl/Internal-DeferredShading.shader
-
42Assets/ScriptableRenderLoop/fptl/StandardTest.shader
-
2Assets/ScriptableRenderLoop/fptl/TiledLightingTemplate.hlsl
-
2Assets/ScriptableRenderLoop/fptl/TiledReflectionTemplate.hlsl
-
38Assets/ScriptableRenderLoop/fptl/UnityStandardForwardNew.cginc
-
19Assets/ScriptableRenderLoop/fptl/RegularForwardLightingTemplate.hlsl
-
25Assets/ScriptableRenderLoop/fptl/RegularForwardLightingUtils.hlsl
-
18Assets/ScriptableRenderLoop/fptl/RegularForwardReflectionTemplate.hlsl
|
|||
#ifndef __REGULARFORWARDLIGHTINGTEMPLATE_H__ |
|||
#define __REGULARFORWARDLIGHTINGTEMPLATE_H__ |
|||
|
|||
|
|||
#include "RegularForwardLightingUtils.hlsl" |
|||
#include "LightingTemplate.hlsl" |
|||
|
|||
|
|||
float3 ExecuteLightList(out uint numLightsProcessed, uint2 pixCoord, float3 vP, float3 vPw, float3 Vworld) |
|||
{ |
|||
uint start = 0, numLights = 0; |
|||
GetCountAndStart(start, numLights, DIRECT_LIGHT); |
|||
|
|||
numLightsProcessed = numLights; // mainly for debugging/heat maps |
|||
return ExecuteLightList(start, numLights, vP, vPw, Vworld); |
|||
} |
|||
|
|||
|
|||
#endif |
|
|||
#ifndef __REGULARFORWARDLIGHTINGUTILS_H__ |
|||
#define __REGULARFORWARDLIGHTINGUTILS_H__ |
|||
|
|||
|
|||
#include "LightingUtils.hlsl" |
|||
|
|||
|
|||
StructuredBuffer<SFiniteLightData> g_vLightData; |
|||
StructuredBuffer<uint> g_vLightListMeshInst; // build on CPU if in use. direct lights first, then reflection probes. |
|||
|
|||
uniform int g_numLights; |
|||
uniform int g_numReflectionProbes; |
|||
|
|||
void GetCountAndStart(out uint start, out uint nrLights, uint model) |
|||
{ |
|||
start = model==REFLECTION_LIGHT ? g_numLights : 0; // offset by numLights entries |
|||
nrLights = model==REFLECTION_LIGHT ? g_numReflectionProbes : g_numLights; |
|||
} |
|||
|
|||
uint FetchIndex(const uint start, const uint l) |
|||
{ |
|||
return g_vLightListMeshInst[start+l]; |
|||
} |
|||
|
|||
#endif |
|
|||
#ifndef __REGULARFORWARDREFLECTIONTEMPLATE_H__ |
|||
#define __REGULARFORWARDREFLECTIONTEMPLATE_H__ |
|||
|
|||
|
|||
#include "RegularForwardLightingUtils.hlsl" |
|||
#include "ReflectionTemplate.hlsl" |
|||
|
|||
|
|||
float3 ExecuteReflectionList(out uint numReflectionProbesProcessed, uint2 pixCoord, float3 vP, float3 vNw, float3 Vworld, float smoothness) |
|||
{ |
|||
uint start = 0, numReflectionProbes = 0; |
|||
GetCountAndStart(start, numReflectionProbes, REFLECTION_LIGHT); |
|||
|
|||
numReflectionProbesProcessed = numReflectionProbes; // mainly for debugging/heat maps |
|||
return ExecuteReflectionList(start, numReflectionProbes, vP, vNw, Vworld, smoothness); |
|||
} |
|||
|
|||
#endif |
撰写
预览
正在加载...
取消
保存
Reference in new issue