This commit is contained in:
Sascha Willems 2024-06-23 19:51:54 +02:00
commit d868ac8277
4 changed files with 4 additions and 4 deletions

View file

@ -12,9 +12,9 @@ void main()
int n = 0;
vec2 texelSize = 1.0 / vec2(textureSize(samplerSSAO, 0));
float result = 0.0;
for (int x = -blurRange; x < blurRange; x++)
for (int x = -blurRange; x <= blurRange; x++)
{
for (int y = -blurRange; y < blurRange; y++)
for (int y = -blurRange; y <= blurRange; y++)
{
vec2 offset = vec2(float(x), float(y)) * texelSize;
result += texture(samplerSSAO, inUV + offset).r;

Binary file not shown.

View file

@ -11,9 +11,9 @@ float4 main([[vk::location(0)]] float2 inUV : TEXCOORD0) : SV_TARGET
textureSSAO.GetDimensions(texDim.x, texDim.y);
float2 texelSize = 1.0 / (float2)texDim;
float result = 0.0;
for (int x = -blurRange; x < blurRange; x++)
for (int x = -blurRange; x <= blurRange; x++)
{
for (int y = -blurRange; y < blurRange; y++)
for (int y = -blurRange; y <= blurRange; y++)
{
float2 offset = float2(float(x), float(y)) * texelSize;
result += textureSSAO.Sample(samplerSSAO, inUV + offset).r;

Binary file not shown.