forked from Dynamitos/Seele
Fix miscellaneus errors
This commit is contained in:
1 parent
d33533474c
commit
1bb36333e6
17 files changed
+146
-88
No files matched your search
@@ -359,7 +359,9 @@ struct CookTorrance : IBRDF
|
||||
const float MAX_REFLECTION_LOD = 4;
|
||||
float3 prefilteredColor = pLightEnv.prefilteredMap.SampleLevel(pLightEnv.irradianceSampler, r, roughness * MAX_REFLECTION_LOD).xyz;
|
||||
|
||||
float2 envBRDF = pLightEnv.brdfLUT.Sample(pLightEnv.lutSampler, float2(max(dot(normal, viewDir_WS), 0), roughness)).rg;
|
||||
// brdfLUT has no mip levels and is indexed analytically (N·V, roughness) with no screen
|
||||
// derivatives, so implicit LOD is unavailable (GLCompute/Ray) and meaningless: use level 0.
|
||||
float2 envBRDF = pLightEnv.brdfLUT.SampleLevel(pLightEnv.lutSampler, float2(max(dot(normal, viewDir_WS), 0), roughness), 0).rg;
|
||||
float3 specular = prefilteredColor * (F * envBRDF.x + envBRDF.y);
|
||||
|
||||
return (k_d * diffuse + specular) * ambientOcclusion;
|
||||
|
||||
@@ -68,7 +68,7 @@ struct DrawCallOffsets
|
||||
};
|
||||
#ifdef RAY_TRACING
|
||||
// Shader record buffers are accessed via a different mechanism and don't use descriptor set bindings
|
||||
layout(set = 15, shaderRecordEXT)
|
||||
layout(shaderRecordEXT)
|
||||
#else
|
||||
layout(push_constant)
|
||||
#endif
|
||||
|
||||
@@ -7,6 +7,7 @@ void miss(inout RayPayload p)
|
||||
// p.shading.normal = -WorldRayDirection();
|
||||
// p.shading.normalLight = -WorldRayDirection();
|
||||
// p.material.color = float4(0, 0, 0, 0);
|
||||
p.light = float3(pRayTracingParams.skyBox.Sample(pRayTracingParams.skyBoxSampler, WorldRayDirection()).xyz);
|
||||
// miss shaders (GLCompute) can't do ImplicitLod (mip) sampling; use a fixed level
|
||||
p.light = float3(pRayTracingParams.skyBox.SampleLevel(pRayTracingParams.skyBoxSampler, WorldRayDirection(), 0).xyz);
|
||||
p.hit = false;
|
||||
}
|
||||
Reference in new issue
Block a user