| 67 | } |
| 68 | |
| 69 | oidn_device_inline vec3f getNormal(int h, int w) const |
| 70 | { |
| 71 | vec3f value = normal.get3(h, w); |
| 72 | |
| 73 | // Sanitize |
| 74 | value = math::clamp(math::nan_to_zero(value), -1.f, 1.f); |
| 75 | |
| 76 | // Transform to [0..1] |
| 77 | value = value * 0.5f + 0.5f; |
| 78 | |
| 79 | return value; |
| 80 | } |
| 81 | |
| 82 | oidn_device_inline void operator ()(const oidn_private WorkGroupItem<2>& it) const |
| 83 | { |
no test coverage detected