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:
parent
fd7f93b0a7
commit
fc9753a8fc
4 changed files with 4 additions and 4 deletions
|
|
@ -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.
|
|
@ -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.
Loading…
Add table
Add a link
Reference in a new issue