|
@@ -12,10 +12,10 @@
|
|
|
|
|
|
|
|
layout(set = 0, binding = 0) uniform sampler u_nearestAnyClampSampler;
|
|
layout(set = 0, binding = 0) uniform sampler u_nearestAnyClampSampler;
|
|
|
layout(set = 0, binding = 1) uniform sampler u_linearAnyClampSampler;
|
|
layout(set = 0, binding = 1) uniform sampler u_linearAnyClampSampler;
|
|
|
-layout(set = 0, binding = 2) uniform texture2D u_quarterDiffuseIndirectTex;
|
|
|
|
|
|
|
+layout(set = 0, binding = 2) uniform ANKI_RP texture2D u_quarterDiffuseIndirectTex;
|
|
|
layout(set = 0, binding = 3) uniform texture2D u_quarterDepthTex;
|
|
layout(set = 0, binding = 3) uniform texture2D u_quarterDepthTex;
|
|
|
layout(set = 0, binding = 4) uniform texture2D u_fullDepthTex;
|
|
layout(set = 0, binding = 4) uniform texture2D u_fullDepthTex;
|
|
|
-layout(set = 0, binding = 5) uniform texture2D u_gbuffer0Tex;
|
|
|
|
|
|
|
+layout(set = 0, binding = 5) uniform ANKI_RP texture2D u_gbuffer0Tex;
|
|
|
|
|
|
|
|
layout(push_constant, std430) uniform b_pc
|
|
layout(push_constant, std430) uniform b_pc
|
|
|
{
|
|
{
|
|
@@ -24,7 +24,7 @@ layout(push_constant, std430) uniform b_pc
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
layout(location = 0) in Vec2 in_uv;
|
|
layout(location = 0) in Vec2 in_uv;
|
|
|
-layout(location = 0) out Vec3 out_color;
|
|
|
|
|
|
|
+layout(location = 0) out ANKI_RP Vec3 out_color;
|
|
|
|
|
|
|
|
void main()
|
|
void main()
|
|
|
{
|
|
{
|
|
@@ -45,14 +45,15 @@ void main()
|
|
|
const F32 w = calculateBilateralWeightDepth(depthCenter, depthTap, 1.0);
|
|
const F32 w = calculateBilateralWeightDepth(depthCenter, depthTap, 1.0);
|
|
|
sumWeight += w;
|
|
sumWeight += w;
|
|
|
|
|
|
|
|
- const Vec3 colorTap = textureLod(u_quarterDiffuseIndirectTex, u_nearestAnyClampSampler, sampleUv, 0.0).xyz;
|
|
|
|
|
|
|
+ const ANKI_RP Vec3 colorTap =
|
|
|
|
|
+ textureLod(u_quarterDiffuseIndirectTex, u_nearestAnyClampSampler, sampleUv, 0.0).xyz;
|
|
|
out_color += colorTap * w;
|
|
out_color += colorTap * w;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Modulate
|
|
// Modulate
|
|
|
out_color /= sumWeight;
|
|
out_color /= sumWeight;
|
|
|
- const Vec3 albedo = textureLod(u_gbuffer0Tex, u_linearAnyClampSampler, in_uv, 0.0).xyz;
|
|
|
|
|
|
|
+ const ANKI_RP Vec3 albedo = textureLod(u_gbuffer0Tex, u_linearAnyClampSampler, in_uv, 0.0).xyz;
|
|
|
out_color *= albedo;
|
|
out_color *= albedo;
|
|
|
}
|
|
}
|
|
|
#pragma anki end
|
|
#pragma anki end
|