Trying to fix other passes
This commit is contained in:
@@ -15,9 +15,9 @@ layout(set=5)
|
||||
ParameterBlock<LightCullingData> pLightCullingData;
|
||||
|
||||
[shader("pixel")]
|
||||
void pixelMain(in MaterialParameter params : PARAMETER, out float4 baseColor)
|
||||
float4 pixelMain(in MaterialParameter params : PARAMETER) : SV_Target
|
||||
{
|
||||
BRDF brdf = pMaterial.prepare(params);
|
||||
let brdf = pMaterial.prepare(params);
|
||||
float3 result = float3(0, 0, 0);
|
||||
for(int i = 0; i < pLightEnv.numDirectionalLights; ++i)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Common;
|
||||
import DispatchParams;
|
||||
|
||||
struct ComputeShaderInput
|
||||
{
|
||||
@@ -8,17 +9,6 @@ struct ComputeShaderInput
|
||||
uint groupIndex : SV_GroupIndex;
|
||||
};
|
||||
|
||||
struct DispatchParams
|
||||
{
|
||||
uint3 numThreadGroups;
|
||||
uint pad0;
|
||||
uint3 numThreads;
|
||||
uint pad1;
|
||||
RWStructuredBuffer<Frustum> frustums;
|
||||
}
|
||||
ParameterBlock<DispatchParams> pDispatchParams;
|
||||
|
||||
|
||||
[numthreads(BLOCK_SIZE, BLOCK_SIZE, 1)]
|
||||
[shader("compute")]
|
||||
void computeFrustums(ComputeShaderInput in)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Common;
|
||||
import DispatchParams;
|
||||
import LightEnv;
|
||||
|
||||
struct ComputeShaderInput
|
||||
@@ -10,11 +11,6 @@ struct ComputeShaderInput
|
||||
};
|
||||
struct CullingParams
|
||||
{
|
||||
uint3 numThreadGroups;
|
||||
uint pad0;
|
||||
uint3 numThreads;
|
||||
uint pad1;
|
||||
|
||||
Texture2D depthTextureVS;
|
||||
|
||||
globallycoherent RWStructuredBuffer<uint> oLightIndexCounter;
|
||||
@@ -25,9 +21,8 @@ struct CullingParams
|
||||
|
||||
RWTexture2D<uint2> oLightGrid;
|
||||
RWTexture2D<uint2> tLightGrid;
|
||||
|
||||
StructuredBuffer<Frustum> frustums;
|
||||
};
|
||||
layout(set=2)
|
||||
ParameterBlock<CullingParams> pCullingParams;
|
||||
// Debug
|
||||
//Texture2D lightCountHeatMap;
|
||||
@@ -81,7 +76,7 @@ void cullLights(ComputeShaderInput in)
|
||||
uMaxDepth = 0x0;
|
||||
oLightCount = 0;
|
||||
tLightCount = 0;
|
||||
groupFrustum = pCullingParams.frustums[in.groupID.x + (in.groupID.y * pCullingParams.numThreadGroups.x)];
|
||||
groupFrustum = pDispatchParams.frustums[in.groupID.x + (in.groupID.y * pDispatchParams.numThreadGroups.x)];
|
||||
}
|
||||
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
|
||||
@@ -15,6 +15,7 @@ struct SkyboxData
|
||||
float4x4 transformMatrix;
|
||||
float4 fogBlend;
|
||||
};
|
||||
layout(set=1)
|
||||
ParameterBlock<SkyboxData> pSkyboxData;
|
||||
|
||||
[shader("vertex")]
|
||||
@@ -36,6 +37,7 @@ struct TextureData
|
||||
TextureCube cubeMap2;
|
||||
SamplerState sampler;
|
||||
};
|
||||
layout(set=2)
|
||||
ParameterBlock<TextureData> pTextures;
|
||||
static const float lowerLimit = 0.0;
|
||||
static const float upperLimit = 0.1;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import Common;
|
||||
|
||||
struct DispatchParams
|
||||
{
|
||||
uint3 numThreadGroups;
|
||||
uint pad0;
|
||||
uint3 numThreads;
|
||||
uint pad1;
|
||||
RWStructuredBuffer<Frustum> frustums;
|
||||
}
|
||||
layout(set=1)
|
||||
ParameterBlock<DispatchParams> pDispatchParams;
|
||||
Reference in New Issue
Block a user