Reputation: 48
Use logarithmic depth buffer is a very simple change, just enable logarithmicDepthBuffer when create THREE.WebGLRenderer like so:
var renderer = new THREE.WebGLRenderer({ antialias: true, logarithmicDepthBuffer: true});
But is there any way to change the logarithmicDepthBuffer flag after WebGLRenderer
created,or when rendering.
Upvotes: 2
Views: 1625
Reputation: 31026
The initial setting of logarithmicDepthBuffer
is internally cached in a class called WebGLPrograms
. So you can't change this setting at runtime. You have to create a new instance of WebGLRenderer
.
BTW: All parameters assigned to the constructor of WebGLRenderer
are considered to be immutable.
three.js R112
Upvotes: 1