浏览代码

switch to using our actual pound defines.

switch to using our actual pound defines.
/main
mmikk 8 年前
当前提交
11332e04
共有 3 个文件被更改,包括 26 次插入26 次删除
  1. 8
      Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute
  2. 26
      Assets/ScriptableRenderLoop/fptl/lightlistbuild-clustered.compute
  3. 18
      Assets/ScriptableRenderLoop/fptl/lightlistbuild.compute

8
Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute


if(t==0) lightOffs = 0;
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

}
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

lightsListLDS[l]=0xffffffff;
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
}

}
}
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
}

26
Assets/ScriptableRenderLoop/fptl/lightlistbuild-clustered.compute


#include "LightingConvexHullUtils.hlsl"
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
#include "SortingComputeUtils.hlsl"
#endif

#endif
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

InterlockedMax(ldsZMax, asuint(dpt_ma) );
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
dpt_ma = asfloat(ldsZMax);

}
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

#endif
// sort lights (gives a more efficient execution in both deferred and tiled forward lighting).
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
SORTLIST(coarseList, iNrCoarseLights, MAX_NR_COARSE_ENTRIES, t, NR_THREADS);
#endif

}
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

int p = i>>2;
int m = i&3;
if(i<24) lightPlanes[6*m+p] = FetchPlane(min(iNrCoarseLights-1,ll+m), p);
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

}
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
}

coarseList[l]=0xffffffff;
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

lightOffsSph = offs;
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

{
if(threadID==0) ldsIsLightInvisible=0;
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
const int idxCoarse = coarseList[l];

if(bFoundSepPlane) InterlockedOr(ldsIsLightInvisible, 1);
}
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
if(threadID==0 && ldsIsLightInvisible==0)

}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
return lightOffs2;

18
Assets/ScriptableRenderLoop/fptl/lightlistbuild.compute


#include "LightingConvexHullUtils.hlsl"
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
#include "SortingComputeUtils.hlsl"
#endif

lightOffs = 0;
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

InterlockedMin(ldsZMin, asuint(dpt_mi));
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif
}

if(t<2) ldsDoesLightIntersect[t] = 0;
#endif
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

//
if(t<NR_LIGHT_MODELS) ldsModelListCount[t]=0;
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

// sort lights (gives a more efficient execution in both deferred and tiled forward lighting).
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
SORTLIST(prunedList, nrLightsCombinedList, MAX_NR_COARSE_ENTRIES, t, NR_THREADS);
//MERGESORTLIST(prunedList, coarseList, nrLightsCombinedList, t, NR_THREADS);
#endif

for(int l=threadID; l<iNrCoarseLights; l+=NR_THREADS)
prunedList[l]=coarseList[l];
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

}
}
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

InterlockedOr(ldsDoesLightIntersect[1], uLightsFlags[1]);
if(t==0) ldsNrLightsFinal = 0;
#if !defined(XBONE) && !defined(PLAYSTATION4)
#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_PSSL)
GroupMemoryBarrierWithGroupSync();
#endif

正在加载...
取消
保存