Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn public low level path tracing functions/structures #1311

Closed
mkanada opened this issue Dec 22, 2021 · 2 comments
Closed

Turn public low level path tracing functions/structures #1311

mkanada opened this issue Dec 22, 2021 · 2 comments

Comments

@mkanada
Copy link

mkanada commented Dec 22, 2021

I'm creating (again) one adaptive sampling trace based in this great software. But I just want to use this as a library and not modify your code. To do so, I need some low level functions/structures be public in 'yocto_pathtrace.h'.

struct trace_result {
vec3f radiance = {0, 0, 0};
bool hit = false;
vec3f albedo = {0, 0, 0};
vec3f normal = {0, 0, 0};
};

ray3f sample_camera(const camera_data& camera, const vec2i& ij,
const vec2i& image_size, const vec2f& puv, const vec2f& luv, bool tent);

using sampler_func = trace_result (*)(const scene_data& scene,
const scene_bvh& bvh, const trace_lights& lights, const ray3f& ray,
rng_state& rng, const trace_params& params);

sampler_func get_trace_sampler_func(const trace_params& params);

static trace_result trace_path(const scene_data& scene, const scene_bvh& bvh,
const trace_lights& lights, const ray3f& ray_, rng_state& rng,
const trace_params& params);

Thanks again by your great software.

@xelatihy
Copy link
Owner

Make sense. I'll do this in the next release.

@xelatihy
Copy link
Owner

Listed in #1375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants