We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Passing Parameters to WebGLRenderer

Home Forums Programming Passing Parameters to WebGLRenderer

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35068
    Alex TAYLOR
    Customer

    Hi!
    I’m sometimes working with models imported from a colleague, and I have depth clash issues when zooming out.
    Researching a little it and testing with these model, it appears that setting logarithmicDepthBuffer=true solves this problem.
    So far I have confirmed this works by hard-coding a change in v3d.js, which is obviously not good practice!

    What is the correct way to pass a parameter to be used when the new renderer is initialised? Is there a puzzle that covers this, or something that could be added to $myapp.js ?

    Thanks!

    #35079

    Hi,

    for now, the only reasonable way to do so is to override App class. Find it in the src/extras/App.js script inside your Verge3D distribution.

    Please note that using logarithmicDepthBuffer can affect the performance of your app in a negative way. Perhaps you should try other options – e.g increasing near clipping distance for your camera might help as well.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #35083
    Alex TAYLOR
    Customer

    Thanks Alexander,
    Yes, I saw the warning in the docs about performance issues – I’ll test and see if it’s acceptable for the nature of the models. Thanks for the tip on near clipping distance also!

    Cheers, Alex

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.