Adding texture views are first class primitives

This commit is contained in:
2025-07-04 17:36:40 +02:00
parent 85f88d79bd
commit b2cb8b42e4
26 changed files with 233 additions and 103 deletions
+4 -1
View File
@@ -163,6 +163,9 @@ float3 ImportanceSampleGGX(float2 Xi, float3 N, float roughness)
return normalize(sampleVec);
}
layout(push_constant)
ConstantBuffer<float> pRoughness;
[shader("pixel")]
float4 computePrefilteredCubemap(float3 localPos : LOCALPOS) : SV_Target
{
@@ -176,7 +179,7 @@ float4 computePrefilteredCubemap(float3 localPos : LOCALPOS) : SV_Target
for(uint i = 0u; i < SAMPLE_COUNT; ++i)
{
float2 Xi = Hammersley(i, SAMPLE_COUNT);
float3 H = ImportanceSampleGGX(Xi, N, roughness);
float3 H = ImportanceSampleGGX(Xi, N, pRoughness);
float3 L = normalize(2.0 * dot(V, H) * H - V);
float NdotL = max(dot(N, L), 0.0);