Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ bool SampleGGX_VNDF(float roughness_,

float VdotH;
float3 localV, localH;
SampleGGXVisibleNormal(inputSample, V, localToWorld, roughness, localV, localH, VdotH);
SampleGGXVisibleNormal(inputSample.xy, V, localToWorld, roughness, localV, localH, VdotH);

// Compute the reflection direction
float3 localL = 2.0 * VdotH * localH - localV;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ bool SampleAnisoGGX(MaterialData mtlData,
float VdotH;
float3 localV, localH;
float3x3 localToWorld = GetTangentFrame(mtlData);
SampleAnisoGGXVisibleNormal(inputSample, mtlData.V, localToWorld, roughnessX, roughnessY, localV, localH, VdotH);
SampleAnisoGGXVisibleNormal(inputSample.xy, mtlData.V, localToWorld, roughnessX, roughnessY, localV, localH, VdotH);

// Compute the reflection direction
float3 localL = 2.0 * VdotH * localH - localV;
Expand Down Expand Up @@ -336,7 +336,7 @@ bool SampleAnisoGGX(MaterialData mtlData,
float VdotH;
float3 localV, localH;
float3x3 localToWorld = GetTangentFrame(mtlData);
SampleAnisoGGXVisibleNormal(inputSample, mtlData.V, localToWorld, roughnessX, roughnessY, localV, localH, VdotH);
SampleAnisoGGXVisibleNormal(inputSample.xy, mtlData.V, localToWorld, roughnessX, roughnessY, localV, localH, VdotH);

// Compute refraction direction instead of reflection
float3 localL = refract(-localV, localH, 1.0 / mtlData.bsdfData.ior);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void ComputeVolumeScattering(inout PathIntersection pathIntersection : SV_RayPay
// Light sampling
if (computeDirect)
{
if (SampleLights(lightList, inputSample.xyz, scatteringPosition, 0.0, ray.Direction, value, pdf, ray.TMax))
if (SampleLights(lightList, inputSample, scatteringPosition, 0.0, ray.Direction, value, pdf, ray.TMax))
{
// FIXME: Apply phase function and divide by pdf (only isotropic for now, and not sure about sigmaS value)
value *= _HeightFogBaseScattering.xyz * ComputeHeightFogMultiplier(scatteringPosition.y) * INV_FOUR_PI / pdf;
Expand Down