Commit 54f3490
Fix ssao precision issue around silhouettes
In the ssao pass, for silhouette pixels,
```
highp vec3 v = p - origin;
```
can be a "long" vector where the length cannot be captured with
mediump on mobile. This means that
```
float vv = dot(v, v);
float vn = dot(v, normal);
```
and other variables can overflow. This caused the silhouettes to
be dark when ssao is turned on a PowerVR gpu.
The fix is use highp for the relevant variables.1 parent e0b2133 commit 54f3490
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
0 commit comments