Fix sunlight artifact
This commit is contained in:
parent
9fc4acf440
commit
4fa00d01ea
1 changed files with 3 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ void main()
|
|||
if (c.a == -1.0)
|
||||
{
|
||||
float count = 0.0;
|
||||
c = vec4(0.0, 0.0, 0.0, -1.0);
|
||||
c = vec4(0.0);
|
||||
for (int y = -1; y <= 1; y++)
|
||||
{
|
||||
for (int x = -1; x <= 1; x++)
|
||||
|
|
@ -54,6 +54,8 @@ void main()
|
|||
}
|
||||
if (count != 0.0)
|
||||
c /= count;
|
||||
else
|
||||
c = vec4(0.0, 0.0, 0.0, -1.0);
|
||||
}
|
||||
|
||||
fragcolor = c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue