Skip to content

Commit

Permalink
addtest
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Aug 16, 2022
1 parent 5535755 commit 404fdee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions misc/graphs/loremTest.zsg

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion zenovis/include/zenovis/DrawOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct DrawOptions {
bool enable_gi = false;
bool smooth_shading = false;
bool normal_check = false;
int num_samples = 16;
int num_samples = 1;

glm::vec3 bgcolor{0.23f, 0.23f, 0.23f};
};
Expand Down
7 changes: 4 additions & 3 deletions zenovis/xinxinoptix/optixPathTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1575,12 +1575,13 @@ void set_perspective(float const *U, float const *V, float const *W, float const


void optixrender(int fbo, int samples) {
// 张心欣请解除注释这行代码:
//samples = 256;
if (!output_buffer_o) throw sutil::Exception("no output_buffer_o");
if (!gl_display_o) throw sutil::Exception("no gl_display_o");
updateState( *output_buffer_o, state.params );
const int max_samples_once = 1;
//std::cout<<"samples"<<samples<<std::endl;
for (int f = 0; f < samples && state.params.subframe_index<=256; f += max_samples_once) {
const int max_samples_once = 16;
for (int f = 0; f < samples; f += max_samples_once) { // 张心欣不要改这里
state.params.samples_per_launch = std::min(samples - f, max_samples_once);
launchSubframe( *output_buffer_o, state );
state.params.subframe_index++;
Expand Down

0 comments on commit 404fdee

Please sign in to comment.