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

More Reflections and Sample Count #7

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
8 changes: 4 additions & 4 deletions src/tantalum.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,19 @@ Tantalum.prototype.setupUI = function() {

var mouseListener = new tui.MouseListener(canvas, renderer.setEmitterPos.bind(renderer));

var temperatureSlider = new tui.Slider("emission-temperature", 1000, 10000, true, function(temperature) {
var temperatureSlider = new tui.Slider("emission-temperature", 100, 100000, true, function(temperature) {
this.setLabel("Temperature: " + temperature + "K");
renderer.setEmitterTemperature(temperature);
spectrumRenderer.setSpectrum(renderer.getEmissionSpectrum());
});

var bounceSlider = new tui.Slider("path-length", 1, 20, true, function(length) {
var bounceSlider = new tui.Slider("path-length", 1, 41, true, function(length) {
this.setLabel((length - 1) + " light bounces");
renderer.setMaxPathLength(length);
});
bounceSlider.setValue(12);

var sampleSlider = new tui.Slider("sample-count", 400, 700, true, function(exponent100) {
var sampleSlider = new tui.Slider("sample-count", 1, 1000, true, function(exponent100) {
var sampleCount = Math.floor(Math.pow(10, exponent100*0.01));
this.setLabel(sampleCount + " light paths");
renderer.setMaxSampleCount(sampleCount);
Expand Down Expand Up @@ -281,4 +281,4 @@ Tantalum.prototype.renderLoop = function(timestamp) {
this.progressBar.setLabel(Math.min(this.renderer.totalRaysTraced(), this.renderer.maxRayCount()) +
"/" + this.renderer.maxRayCount() + " rays traced; Progress: " +
this.progressBar.getProgressPercentage() + "%");
}
}