Adding texture views are first class primitives
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user