diff --git a/Samples/BulkLoadDemo/BulkLoadDemo/BulkLoadDemo.vcxproj b/Samples/BulkLoadDemo/BulkLoadDemo/BulkLoadDemo.vcxproj
index 2ddb33e..461cd5d 100644
--- a/Samples/BulkLoadDemo/BulkLoadDemo/BulkLoadDemo.vcxproj
+++ b/Samples/BulkLoadDemo/BulkLoadDemo/BulkLoadDemo.vcxproj
@@ -23,7 +23,7 @@
v142
16.0
Native
- 10.0.19041.0
+ 10.0
diff --git a/Samples/BulkLoadDemo/Core/Core.vcxproj b/Samples/BulkLoadDemo/Core/Core.vcxproj
index 7fa1998..01784fc 100644
--- a/Samples/BulkLoadDemo/Core/Core.vcxproj
+++ b/Samples/BulkLoadDemo/Core/Core.vcxproj
@@ -20,7 +20,7 @@
en-US
Win32Proj
16.0
- 10.0.19041.0
+ 10.0
Native
diff --git a/Samples/BulkLoadDemo/Core/Shaders/BicubicFilterFunctions.hlsli b/Samples/BulkLoadDemo/Core/Shaders/BicubicFilterFunctions.hlsli
index cebf26a..ccea813 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/BicubicFilterFunctions.hlsli
+++ b/Samples/BulkLoadDemo/Core/Shaders/BicubicFilterFunctions.hlsli
@@ -31,7 +31,7 @@ float4 GetBicubicFilterWeights(float offset, float A)
//return ComputeWeights(offset, A);
// Precompute weights for 16 discrete offsets
- static const float4 FilterWeights[16] =
+ const float4 FilterWeights[16] =
{
ComputeWeights( 0.5 / 16.0, -0.5),
ComputeWeights( 1.5 / 16.0, -0.5),
diff --git a/Samples/BulkLoadDemo/Core/Shaders/BicubicHorizontalUpsamplePS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/BicubicHorizontalUpsamplePS.hlsl
index 70ab88d..d66000c 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/BicubicHorizontalUpsamplePS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/BicubicHorizontalUpsamplePS.hlsl
@@ -41,7 +41,7 @@ float3 GetColor(uint s, uint t)
}
[RootSignature(Present_RootSig)]
-float4 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
+float3 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
{
float2 t = uv * TextureSize + 0.5;
float2 f = frac(t);
@@ -61,5 +61,5 @@ float4 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
W.z * GetColor(s2, st.y) +
W.w * GetColor(s3, st.y);
- return float4(Color, 1);
+ return Color;
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/BicubicUpsamplePS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/BicubicUpsamplePS.hlsl
index 5d8de8a..b973f5e 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/BicubicUpsamplePS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/BicubicUpsamplePS.hlsl
@@ -61,7 +61,7 @@ float3 GetColor(uint s, uint t)
}
[RootSignature(Present_RootSig)]
-float4 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
+float3 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
{
float2 t = uv * TextureSize + 0.5;
float2 f = frac(t);
@@ -88,8 +88,8 @@ float4 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
float3 Color = Cubic(GetWeights(f.y), c0, c1, c2, c3);
#ifdef GAMMA_SPACE
- return float4(Color, 1);
+ return Color;
#else
- return float4(ApplyDisplayProfile(Color, DISPLAY_PLANE_FORMAT), 1);
+ return ApplyDisplayProfile(Color, DISPLAY_PLANE_FORMAT);
#endif
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/BicubicVerticalUpsamplePS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/BicubicVerticalUpsamplePS.hlsl
index a445c69..9fa86e3 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/BicubicVerticalUpsamplePS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/BicubicVerticalUpsamplePS.hlsl
@@ -37,7 +37,7 @@ float3 GetColor(uint s, uint t)
}
[RootSignature(Present_RootSig)]
-float4 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
+float3 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
{
float2 t = uv * TextureSize + 0.5;
float2 f = frac(t);
@@ -58,8 +58,8 @@ float4 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
W.w * GetColor(st.x, t3);
#ifdef GAMMA_SPACE
- return float4(Color,1);
+ return Color;
#else
- return float4(ApplyDisplayProfile(Color, DISPLAY_PLANE_FORMAT), 1);
+ return ApplyDisplayProfile(Color, DISPLAY_PLANE_FORMAT);
#endif
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/BilinearUpsamplePS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/BilinearUpsamplePS.hlsl
index 9222358..b154adc 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/BilinearUpsamplePS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/BilinearUpsamplePS.hlsl
@@ -18,8 +18,8 @@ Texture2D ColorTex : register(t0);
SamplerState BilinearFilter : register(s0);
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
+float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
{
float3 LinearRGB = RemoveDisplayProfile(ColorTex.SampleLevel(BilinearFilter, uv, 0), LDR_COLOR_FORMAT);
- return float4(ApplyDisplayProfile(LinearRGB, DISPLAY_PLANE_FORMAT), 1);
+ return ApplyDisplayProfile(LinearRGB, DISPLAY_PLANE_FORMAT);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/BlurCS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/BlurCS.hlsl
index 863a851..74b10fe 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/BlurCS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/BlurCS.hlsl
@@ -34,7 +34,7 @@ float3 BlurPixels( float3 a, float3 b, float3 c, float3 d, float3 e, float3 f, f
return Weights[0]*e + Weights[1]*(d+f) + Weights[2]*(c+g) + Weights[3]*(b+h) + Weights[4]*(a+i);
}
-// 16x16 pixels with an 8x8 center that we will be blurring writing out. Each uint is two color channels packed together
+// 16x16 pixels with an 8x8 center that we will be blurring writing out. Each uint is two color channels packed together
groupshared uint CacheR[128];
groupshared uint CacheG[128];
groupshared uint CacheB[128];
@@ -67,7 +67,7 @@ void Load1Pixel( uint index, out float3 pixel )
pixel = asfloat( uint3(CacheR[index], CacheG[index], CacheB[index]) );
}
-// Blur two pixels horizontally. This reduces LDS reads and pixel unpacking.
+// Blur two pixels horizontally. This reduces LDS reads and pixel unpacking.
void BlurHorizontally( uint outIndex, uint leftMostIndex )
{
float3 s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
@@ -77,6 +77,9 @@ void BlurHorizontally( uint outIndex, uint leftMostIndex )
Load2Pixels( leftMostIndex + 3, s6, s7 );
Load2Pixels( leftMostIndex + 4, s8, s9 );
+ // Be sure to finish loading values before we rewrite them.
+ GroupMemoryBarrierWithGroupSync();
+
Store1Pixel(outIndex , BlurPixels(s0, s1, s2, s3, s4, s5, s6, s7, s8));
Store1Pixel(outIndex+1, BlurPixels(s1, s2, s3, s4, s5, s6, s7, s8, s9));
}
@@ -104,8 +107,8 @@ void main( uint3 Gid : SV_GroupID, uint3 GTid : SV_GroupThreadID, uint3 DTid : S
//
// Load 4 pixels per thread into LDS
//
- int2 GroupUL = (Gid.xy << 3) - 4; // Upper-left pixel coordinate of group read location
- int2 ThreadUL = (GTid.xy << 1) + GroupUL; // Upper-left pixel coordinate of quad that this thread will read
+ int2 GroupUL = (Gid.xy << 3) - 4; // Upper-left pixel coordinate of group read location
+ int2 ThreadUL = (GTid.xy << 1) + GroupUL; // Upper-left pixel coordinate of quad that this thread will read
//
// Store 4 unblurred pixels in LDS
diff --git a/Samples/BulkLoadDemo/Core/Shaders/ColorSpaceUtility.hlsli b/Samples/BulkLoadDemo/Core/Shaders/ColorSpaceUtility.hlsli
index 3024a9d..b9edb91 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/ColorSpaceUtility.hlsli
+++ b/Samples/BulkLoadDemo/Core/Shaders/ColorSpaceUtility.hlsli
@@ -37,24 +37,24 @@
float3 ApplySRGBCurve( float3 x )
{
// Approximately pow(x, 1.0 / 2.2)
- return x < 0.0031308 ? 12.92 * x : 1.055 * pow(x, 1.0 / 2.4) - 0.055;
+ return select(x < 0.0031308, 12.92 * x, 1.055 * pow(x, 1.0 / 2.4) - 0.055);
}
float3 RemoveSRGBCurve( float3 x )
{
// Approximately pow(x, 2.2)
- return x < 0.04045 ? x / 12.92 : pow( (x + 0.055) / 1.055, 2.4 );
+ return select(x < 0.04045, x / 12.92, pow( (x + 0.055) / 1.055, 2.4 ));
}
// These functions avoid pow() to efficiently approximate sRGB with an error < 0.4%.
float3 ApplySRGBCurve_Fast( float3 x )
{
- return x < 0.0031308 ? 12.92 * x : 1.13005 * sqrt(x - 0.00228) - 0.13448 * x + 0.005719;
+ return select(x < 0.0031308, 12.92 * x, 1.13005 * sqrt(x - 0.00228) - 0.13448 * x + 0.005719);
}
float3 RemoveSRGBCurve_Fast( float3 x )
{
- return x < 0.04045 ? x / 12.92 : -7.43605 * x - 31.24297 * sqrt(-0.53792 * x + 1.279924) + 35.34864;
+ return select(x < 0.04045, x / 12.92, -7.43605 * x - 31.24297 * sqrt(-0.53792 * x + 1.279924) + 35.34864);
}
// The OETF recommended for content shown on HDTVs. This "gamma ramp" may increase contrast as
@@ -62,12 +62,12 @@ float3 RemoveSRGBCurve_Fast( float3 x )
// used in conjunction with HDTVs.
float3 ApplyREC709Curve( float3 x )
{
- return x < 0.0181 ? 4.5 * x : 1.0993 * pow(x, 0.45) - 0.0993;
+ return select(x < 0.0181, 4.5 * x, 1.0993 * pow(x, 0.45) - 0.0993);
}
float3 RemoveREC709Curve( float3 x )
{
- return x < 0.08145 ? x / 4.5 : pow((x + 0.0993) / 1.0993, 1.0 / 0.45);
+ return select(x < 0.08145, x / 4.5, pow((x + 0.0993) / 1.0993, 1.0 / 0.45));
}
// This is the new HDR transfer function, also called "PQ" for perceptual quantizer. Note that REC2084
diff --git a/Samples/BulkLoadDemo/Core/Shaders/CompositeHDRPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/CompositeHDRPS.hlsl
index 299bf89..64eb92b 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/CompositeHDRPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/CompositeHDRPS.hlsl
@@ -24,7 +24,7 @@ cbuffer CB0 : register(b0)
}
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
+float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
{
int2 ST = (int2)position.xy;
@@ -36,5 +36,5 @@ float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
OverlayColor.rgb = REC709toREC2020(OverlayColor.rgb / (OverlayColor.a == 0.0 ? 1.0 : OverlayColor.a));
OverlayColor.rgb = ApplyREC2084Curve(OverlayColor.rgb * PaperWhiteRatio);
- return float4(lerp(MainColor, OverlayColor.rgb, OverlayColor.a), 1);
+ return lerp(MainColor, OverlayColor.rgb, OverlayColor.a);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/CompositeSDRPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/CompositeSDRPS.hlsl
index 72372cf..af53390 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/CompositeSDRPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/CompositeSDRPS.hlsl
@@ -18,9 +18,9 @@ Texture2D MainBuffer : register(t0);
Texture2D OverlayBuffer : register(t1);
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position ) : SV_Target0
+float3 main( float4 position : SV_Position ) : SV_Target0
{
float3 MainColor = ApplyDisplayProfile(MainBuffer[(int2)position.xy], DISPLAY_PLANE_FORMAT);
float4 OverlayColor = OverlayBuffer[(int2)position.xy];
- return float4(OverlayColor.rgb + MainColor.rgb * (1.0 - OverlayColor.a), 1);
+ return OverlayColor.rgb + MainColor.rgb * (1.0 - OverlayColor.a);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/DoFPass1CS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/DoFPass1CS.hlsl
index 657565f..5979201 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/DoFPass1CS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/DoFPass1CS.hlsl
@@ -37,21 +37,24 @@ void main( uint3 Gid : SV_GroupID, uint GI : SV_GroupIndex, uint3 GTid : SV_Grou
float TileMaxDepth = Max4(Depths);
float TileMaxCoC = MaxCoC(Depths);
+ // Write and sync
+ gs_ClosestDepthSearch[GI] = TileMinDepth;
+ gs_FarthestDepthSearch[GI] = TileMaxDepth;
+ gs_MaximumCoC[GI] = TileMaxCoC;
+ GroupMemoryBarrierWithGroupSync();
+
for (uint i = 32; i > 0; i >>= 1)
{
- // Write and sync
- gs_ClosestDepthSearch[GI] = TileMinDepth;
- gs_FarthestDepthSearch[GI] = TileMaxDepth;
- gs_MaximumCoC[GI] = TileMaxCoC;
- GroupMemoryBarrierWithGroupSync();
-
// Read and sync
- TileMinDepth = min(TileMinDepth, gs_ClosestDepthSearch[(GI + i) % 64]);
- TileMaxDepth = max(TileMaxDepth, gs_FarthestDepthSearch[(GI + i) % 64]);
- TileMaxCoC = max(TileMaxCoC, gs_MaximumCoC[(GI + i) % 64]);
+ if (GI < i)
+ {
+ gs_ClosestDepthSearch[i] = min(gs_ClosestDepthSearch[i], gs_ClosestDepthSearch[GI + i]);
+ gs_FarthestDepthSearch[i] = max(gs_FarthestDepthSearch[i], gs_FarthestDepthSearch[GI + i]);
+ gs_MaximumCoC[i] = max(gs_MaximumCoC[i], gs_MaximumCoC[GI + i]);
+ }
GroupMemoryBarrierWithGroupSync();
}
if (GI == 0)
- TileClass[Gid.xy] = float3(TileMaxCoC, TileMinDepth, TileMaxDepth);
+ TileClass[Gid.xy] = float3(gs_MaximumCoC[0], gs_FarthestDepthSearch[0], gs_FarthestDepthSearch[0]);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/GenerateMipsCS.hlsli b/Samples/BulkLoadDemo/Core/Shaders/GenerateMipsCS.hlsli
index 40587de..3ab52f8 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/GenerateMipsCS.hlsli
+++ b/Samples/BulkLoadDemo/Core/Shaders/GenerateMipsCS.hlsli
@@ -55,10 +55,10 @@ float4 LoadColor( uint Index )
float3 ApplySRGBCurve(float3 x)
{
// This is exactly the sRGB curve
- //return x < 0.0031308 ? 12.92 * x : 1.055 * pow(abs(x), 1.0 / 2.4) - 0.055;
+ //return select(x < 0.0031308, 12.92 * x, 1.055 * pow(abs(x), 1.0 / 2.4) - 0.055);
// This is cheaper but nearly equivalent
- return x < 0.0031308 ? 12.92 * x : 1.13005 * sqrt(abs(x - 0.00228)) - 0.13448 * x + 0.005719;
+ return select(x < 0.0031308, 12.92 * x, 1.13005 * sqrt(abs(x - 0.00228)) - 0.13448 * x + 0.005719);
}
float4 PackColor(float4 Linear)
diff --git a/Samples/BulkLoadDemo/Core/Shaders/LanczosFunctions.hlsli b/Samples/BulkLoadDemo/Core/Shaders/LanczosFunctions.hlsli
index d5ac54b..b239ca2 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/LanczosFunctions.hlsli
+++ b/Samples/BulkLoadDemo/Core/Shaders/LanczosFunctions.hlsli
@@ -41,7 +41,7 @@ float4 GetUpscaleFilterWeights(float offset)
//return ComputeWeights(offset);
// Precompute weights for 16 discrete offsets
- static const float4 FilterWeights[16] =
+ const float4 FilterWeights[16] =
{
ComputeWeights( 0.5 / 16.0),
ComputeWeights( 1.5 / 16.0),
diff --git a/Samples/BulkLoadDemo/Core/Shaders/LanczosHorizontalPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/LanczosHorizontalPS.hlsl
index b5dee12..64d0f0d 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/LanczosHorizontalPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/LanczosHorizontalPS.hlsl
@@ -30,7 +30,7 @@ float4x3 LoadSamples(int2 ST, uint2 Stride)
}
[RootSignature(Present_RootSig)]
-float4 main(float4 Pos : SV_Position, float2 UV : TexCoord0) : SV_Target0
+float3 main(float4 Pos : SV_Position, float2 UV : TexCoord0) : SV_Target0
{
// We subtract 0.5 because that represents the center of the pixel. We need to know where
// we lie between two pixel centers, and we will use frac() for that. We subtract another
@@ -53,5 +53,5 @@ float4 main(float4 Pos : SV_Position, float2 UV : TexCoord0) : SV_Target0
Result = ApplyDisplayProfile(Result, DISPLAY_PLANE_FORMAT);
#endif
- return float4(Result, 1);
+ return Result;
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/MagnifyPixelsPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/MagnifyPixelsPS.hlsl
index 179960c..8ac34ff 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/MagnifyPixelsPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/MagnifyPixelsPS.hlsl
@@ -23,8 +23,8 @@ cbuffer Constants : register(b0)
}
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
+float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
{
float2 ScaledUV = ScaleFactor * (uv - 0.5) + 0.5;
- return float4(ColorTex.SampleLevel(PointSampler, ScaledUV, 0), 1);
+ return ColorTex.SampleLevel(PointSampler, ScaledUV, 0);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/ParticleTileCullingCS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/ParticleTileCullingCS.hlsl
index 9fed446..24b2369 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/ParticleTileCullingCS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/ParticleTileCullingCS.hlsl
@@ -106,7 +106,7 @@ void main( uint3 Gid : SV_GroupID, uint GI : SV_GroupIndex, uint3 GTid : SV_Grou
ParticleCountInBin = min(MAX_PARTICLES_PER_BIN, ParticleCountInBin);
// Compute the next power of two for the bitonic sort
- uint NextPow2 = countbits(ParticleCountInBin) <= 1u ? ParticleCountInBin : (2u << firstbithigh(ParticleCountInBin));
+ uint NextPow2 = countbits(ParticleCountInBin) <= 1 ? ParticleCountInBin : (2u << firstbithigh(ParticleCountInBin));
// Fill in the sort key array. Each sort key has passenger data (in the least signficant
// bits, so that as the sort keys are moved around, they retain a pointer to the particle
diff --git a/Samples/BulkLoadDemo/Core/Shaders/PresentHDRPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/PresentHDRPS.hlsl
index 5257a59..9fdc098 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/PresentHDRPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/PresentHDRPS.hlsl
@@ -17,7 +17,7 @@
Texture2D MainBuffer : register(t0);
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
+float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
{
- return float4(ApplyREC2084Curve(MainBuffer[(int2)position.xy] / 10000.0), 1);
+ return ApplyREC2084Curve(MainBuffer[(int2)position.xy] / 10000.0);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/PresentSDRPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/PresentSDRPS.hlsl
index bb47b87..424d7cd 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/PresentSDRPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/PresentSDRPS.hlsl
@@ -17,8 +17,8 @@
Texture2D ColorTex : register(t0);
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position ) : SV_Target0
+float3 main( float4 position : SV_Position ) : SV_Target0
{
float3 LinearRGB = ColorTex[(int2)position.xy];
- return float4(ApplyDisplayProfile(LinearRGB, DISPLAY_PLANE_FORMAT), 1);
+ return ApplyDisplayProfile(LinearRGB, DISPLAY_PLANE_FORMAT);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeHDRPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeHDRPS.hlsl
index c020f00..1a3198a 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeHDRPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeHDRPS.hlsl
@@ -42,14 +42,14 @@ float3 ScaleBuffer(float2 uv)
}
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
+float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
{
- float3 MainColor = ApplyREC2084Curve(ScaleBuffer(uv) / 10000.0);
+ float3 MainColor = ApplyREC2084Curve( saturate(ScaleBuffer(uv) / 10000.0) );
float4 OverlayColor = OverlayBuffer[(int2)position.xy];
OverlayColor.rgb = RemoveSRGBCurve(OverlayColor.rgb);
OverlayColor.rgb = REC709toREC2020(OverlayColor.rgb / (OverlayColor.a == 0.0 ? 1.0 : OverlayColor.a));
OverlayColor.rgb = ApplyREC2084Curve(OverlayColor.rgb * PaperWhiteRatio);
- return float4(lerp(MainColor, OverlayColor.rgb, OverlayColor.a), 1);
+ return lerp(MainColor, OverlayColor.rgb, OverlayColor.a);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeSDRPS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeSDRPS.hlsl
index 295e24c..2472c46 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeSDRPS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/ScaleAndCompositeSDRPS.hlsl
@@ -40,9 +40,9 @@ float3 ScaleBuffer(float2 uv)
}
[RootSignature(Present_RootSig)]
-float4 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
+float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
{
float3 MainColor = ApplyDisplayProfile(ScaleBuffer(uv), DISPLAY_PLANE_FORMAT);
float4 OverlayColor = OverlayBuffer[(int2)position.xy];
- return float4(OverlayColor.rgb + MainColor.rgb * (1.0 - OverlayColor.a), 1);
+ return OverlayColor.rgb + MainColor.rgb * (1.0 - OverlayColor.a);
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/SharpeningUpsamplePS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/SharpeningUpsamplePS.hlsl
index 459c82c..0c18222 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/SharpeningUpsamplePS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/SharpeningUpsamplePS.hlsl
@@ -37,15 +37,15 @@ float3 GetColor(float2 UV)
}
[RootSignature(Present_RootSig)]
-float4 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
+float3 main(float4 position : SV_Position, float2 uv : TexCoord0) : SV_Target0
{
float3 Color = WB * GetColor(uv) - WA * (
GetColor(uv + UVOffset0) + GetColor(uv - UVOffset0) +
GetColor(uv + UVOffset1) + GetColor(uv - UVOffset1));
#ifdef GAMMA_SPACE
- return float4(Color, 1);
+ return Color;
#else
- return float4(ApplyDisplayProfile(Color, DISPLAY_PLANE_FORMAT), 1);
+ return ApplyDisplayProfile(Color, DISPLAY_PLANE_FORMAT);
#endif
}
diff --git a/Samples/BulkLoadDemo/Core/Shaders/TemporalBlendCS.hlsl b/Samples/BulkLoadDemo/Core/Shaders/TemporalBlendCS.hlsl
index cf79eb6..7b79305 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/TemporalBlendCS.hlsl
+++ b/Samples/BulkLoadDemo/Core/Shaders/TemporalBlendCS.hlsl
@@ -194,8 +194,6 @@ void main(uint3 DTid : SV_DispatchThreadID, uint GI : SV_GroupIndex, uint3 GTid
uint Idx0 = GTid.x * 2 + GTid.y * kLdsPitch + kLdsPitch + 1;
uint Idx1 = Idx0 + 1;
- GroupMemoryBarrierWithGroupSync();
-
float3 BoxMin, BoxMax;
GetBBoxForPair(Idx0, Idx1, BoxMin, BoxMax);
diff --git a/Samples/BulkLoadDemo/Core/Shaders/ToneMappingUtility.hlsli b/Samples/BulkLoadDemo/Core/Shaders/ToneMappingUtility.hlsli
index e193236..666c0c4 100644
--- a/Samples/BulkLoadDemo/Core/Shaders/ToneMappingUtility.hlsli
+++ b/Samples/BulkLoadDemo/Core/Shaders/ToneMappingUtility.hlsli
@@ -30,7 +30,7 @@ float3 TM_Reinhard(float3 hdr, float k = 1.0)
// The inverse of Reinhard
float3 ITM_Reinhard(float3 sdr, float k = 1.0)
{
- return k * sdr / (k - sdr);
+ return k * sdr / (1.0 - sdr);
}
//
diff --git a/Samples/BulkLoadDemo/MiniArchive/MiniArchive.vcxproj b/Samples/BulkLoadDemo/MiniArchive/MiniArchive.vcxproj
index 9907176..13c855e 100644
--- a/Samples/BulkLoadDemo/MiniArchive/MiniArchive.vcxproj
+++ b/Samples/BulkLoadDemo/MiniArchive/MiniArchive.vcxproj
@@ -20,7 +20,7 @@
en-US
Win32Proj
16.0
- 10.0.19041.0
+ 10.0
Native
diff --git a/Samples/BulkLoadDemo/Model/Model.vcxproj b/Samples/BulkLoadDemo/Model/Model.vcxproj
index c4062f8..68438f9 100644
--- a/Samples/BulkLoadDemo/Model/Model.vcxproj
+++ b/Samples/BulkLoadDemo/Model/Model.vcxproj
@@ -20,7 +20,7 @@
en-US
Win32Proj
16.0
- 10.0.19041.0
+ 10.0
Native
diff --git a/Samples/BulkLoadDemo/PropertySheets/Build.props b/Samples/BulkLoadDemo/PropertySheets/Build.props
index 5cd3640..e314828 100644
--- a/Samples/BulkLoadDemo/PropertySheets/Build.props
+++ b/Samples/BulkLoadDemo/PropertySheets/Build.props
@@ -64,6 +64,7 @@
true
-Qembed_debug %(AdditionalOptions)
+ -HV 2021 %(AdditionalOptions)
\ No newline at end of file
diff --git a/Samples/BulkLoadDemo/PropertySheets/Desktop.props b/Samples/BulkLoadDemo/PropertySheets/Desktop.props
index aa1434e..27e0a08 100644
--- a/Samples/BulkLoadDemo/PropertySheets/Desktop.props
+++ b/Samples/BulkLoadDemo/PropertySheets/Desktop.props
@@ -15,7 +15,7 @@
_GAMING_DESKTOP=1
- 6.1
+ 6.2