Update consoles building

This commit is contained in:
Wojtek Figat
2023-02-05 23:48:11 +01:00
parent ac45bbe53e
commit c878c613c7
27 changed files with 51 additions and 43 deletions

View File

@@ -232,7 +232,7 @@ float3 SampleDDGIIrradiance(DDGIData data, Texture2D<snorm float4> probesData, T
weight *= Square(weight) * (1.0f / (minWeightThreshold * minWeightThreshold));
// Calculate trilinear weights based on the distance to each probe to smoothly transition between grid of 8 probes
float3 trilinear = lerp(1.0f - biasAlpha, biasAlpha, probeCoordsOffset);
float3 trilinear = lerp(1.0f - biasAlpha, biasAlpha, (float3)probeCoordsOffset);
weight *= max(trilinear.x * trilinear.y * trilinear.z, 0.001f);
// Sample irradiance texture

View File

@@ -54,7 +54,7 @@ float3 GetSphericalFibonacci(float sampleIndex, float samplesCount)
// Calculates a random normalized ray direction (based on the ray index and the current probes rotation phrase)
float3 GetProbeRayDirection(DDGIData data, uint rayIndex)
{
float3 direction = GetSphericalFibonacci(rayIndex, data.RaysCount);
float3 direction = GetSphericalFibonacci((float)rayIndex, (float)data.RaysCount);
return normalize(QuaternionRotate(data.RaysRotation, direction));
}
@@ -307,7 +307,7 @@ void CS_TraceRays(uint3 DispatchThreadId : SV_DispatchThreadID)
else
{
// Ray hits sky
radiance.rgb = Skybox.SampleLevel(SamplerLinearClamp, probeRayDirection, 0);
radiance.rgb = Skybox.SampleLevel(SamplerLinearClamp, probeRayDirection, 0).rgb;
radiance.a = 1e27f; // Sky is the limit
}

View File

@@ -153,7 +153,7 @@ float4 SampleGlobalSurfaceAtlasTile(const GlobalSurfaceAtlasData data, GlobalSur
bilinearWeights.w = (1 - bilinearWeightsUV.x) * (1 - bilinearWeightsUV.y);
// Tile depth weight based on sample position occlusion
float4 tileZ = depth.Gather(SamplerLinearClamp, atlasUV, 0.0f);
float4 tileZ = depth.Gather(SamplerLinearClamp, atlasUV);
float depthThreshold = 2.0f * surfaceThreshold / tile.ViewBoundsSize.z;
float4 depthVisibility = 1.0f;
UNROLL

View File

@@ -330,7 +330,7 @@ float4 PS_Debug(Quad_VS2PS input) : SV_Target
else
{
// Sample skybox
float3 skybox = Skybox.SampleLevel(SamplerLinearClamp, viewRay, 0);
float3 skybox = Skybox.SampleLevel(SamplerLinearClamp, viewRay, 0).rgb;
float3 sky = float3(0.4f, 0.4f, 1.0f) * saturate(hit.StepsCount / 80.0f);
color = lerp(sky, skybox, SkyboxIntensity);
}