您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
25 行
674 B
25 行
674 B
#ifndef __REGULARFORWARDLIGHTINGUTILS_H__
|
|
#define __REGULARFORWARDLIGHTINGUTILS_H__
|
|
|
|
|
|
#include "LightingUtils.hlsl"
|
|
|
|
|
|
StructuredBuffer<SFiniteLightData> g_vLightData;
|
|
Buffer<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
|