Skip to content

Commit 464b104

Browse files
committed
Updated range for depthBias
1 parent b724183 commit 464b104

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

sample/wireframe/main.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const settings = {
1111
alphaThreshold: 0.5,
1212
animate: true,
1313
lines: true,
14-
depthBias: 0.0,
14+
depthBias: 1,
1515
depthBiasSlopeScale: 0.5,
1616
models: true,
1717
};
@@ -328,23 +328,26 @@ gui.add(settings, 'barycentricCoordinatesBased').onChange(addRemoveGUI);
328328
gui.add(settings, 'lines');
329329
gui.add(settings, 'models');
330330
gui.add(settings, 'animate');
331-
gui.add(settings, 'depthBias', -1, 1, 0.05).onChange(rebuildLitPipeline);
332-
gui
333-
.add(settings, 'depthBiasSlopeScale', -1, 1, 0.05)
334-
.onChange(rebuildLitPipeline);
335331

336332
const guis = [];
337333
function addRemoveGUI() {
334+
guis.forEach((g) => g.remove());
335+
guis.length = 0;
338336
if (settings.barycentricCoordinatesBased) {
339337
guis.push(
340338
gui.add(settings, 'thickness', 0.0, 10).onChange(updateThickness),
341339
gui.add(settings, 'alphaThreshold', 0, 1).onChange(updateThickness)
342340
);
343341
} else {
344-
guis.forEach((g) => g.remove());
345-
guis.length = 0;
342+
guis.push(
343+
gui.add(settings, 'depthBias', -3, 3, 1).onChange(rebuildLitPipeline),
344+
gui
345+
.add(settings, 'depthBiasSlopeScale', -1, 1, 0.05)
346+
.onChange(rebuildLitPipeline)
347+
);
346348
}
347349
}
350+
addRemoveGUI();
348351

349352
function updateThickness() {
350353
objectInfos.forEach(({ lineUniformBuffer, lineUniformValues }) => {

0 commit comments

Comments
 (0)