MCPcopy Create free account
hub / github.com/RenderKit/oidn / getNormal

Function getNormal

devices/gpu/gpu_input_process.h:69–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 2

operator ()Function · 0.85

Calls 3

nan_to_zeroFunction · 0.85
get3Method · 0.80
clampFunction · 0.50

Tested by

no test coverage detected