Closed neon5d closed 2 years ago
you will need to include <psdr/fwd.h> with psdr namespace You can also simple cout << SpectrumC, it is either type enoki::FloatC or enoki::Vector3fC depend on channel
Thank you for your reply. It seems not what I want to know. SpectrumC is a GPU dynamic array. I don't know how to accumulate it. It is very hard to program without an example or documentation.
void main() { psdr::Scene scene;
scene.load_file("data/scenes/cbox_bunny.xml", false); scene.configure();
psdr::DirectIntegrator integrator(2, 2);
int sensor_id = 0; psdr::SpectrumC image = integrator.renderC(scene, sensor_id);
// This doesn't work for (int i=0; I< 20; i++) { image += integrator.renderC(scene, sensor_id); }
}
for this part, you can check enoki c++ interface: https://enoki.readthedocs.io/en/master/gpu.html#c-interface You also want to check how to use scatter_add/scatter function in enoki for such accumulate method.
Thank you. I'll try it.
Hello,
I tried to create a C++ example code to duplicate the python example. I am stuck at accessing SpectrumC data as in the below code. How to access SpectrumC data to read out image pixels? and also do you have any C++ example code? Thank you,
void main() { psdr::Scene scene;
// save image to a file }