Fix SSAO blur range (#1122)

* Fix ssao blur range

* Recompile ssao blur shaders

---------

Co-authored-by: Vladimir Kosachev <vovan675@unigine.com>
This commit is contained in:
Vovan675 2024-06-20 22:56:26 -07:00 committed by GitHub
parent fd7f93b0a7
commit fc9753a8fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

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.