feat: impl random sampling instead of point light algorithm

Random sampling is available when building with `-DRANDOM_SAMPLING', or with
`make randsampl'.

The sample counts are rather low, so the output is both slow and noisy, which is
why it's disabled by default.
This commit is contained in:
2023-12-03 21:20:49 +01:00
parent e7bc9882e6
commit 3827be61ac
3 changed files with 88 additions and 23 deletions

View File

@@ -19,11 +19,15 @@ bin/raytracer: $(OBJ_FILES)
@mkdir -p $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -o $@ $^
.PHONY: randsampl
randsampl: CXXFLAGS += -DRANDOM_SAMPLING
randsampl: bin/raytracer
.PHONY: debug
debug: CXXFLAGS += -O0 -g
debug: clean bin/raytracer
.PHONY: clean
clean:
$(RM) -r obj/*.o
$(RM) bin/*
$(RM) obj/*.o
$(RM) bin/raytracer