Closed DasCapschen closed 3 years ago
Changing execute
to take the set of buffers is probably the cleanest API to provide actually, I'll update oidn-rs to do that
~+1~
This is now resolved in release 1.2.0 https://github.com/Twinklebear/oidn-rs/releases/tag/1.2.0
Is it really necessary to keep the normal and albedo buffer around in the struct with a
'b
lifetime?imo, this just complicates things and leads to unnecessary complaining of the borrow checker.
The only part of code where I saw it actually being used is the execute function, so we might as well pass them in when calling?
execute(&mut self, color: &[f32], albedo: Option<&[f32]>, normal: Option<&[f32]>, output: &mut [f32])
If we really do want to keep them around, could we use a different kind of reference without explicit lifetime?