BlackMojito

Members
  • Content Count

    203
  • Joined

  • Last visited

Everything posted by BlackMojito

  1. I know that material has an "orientation" property which can handle this. But I just want to know if there a global way to do that.
  2. I just read the source code and yes CreateScreenshot calls internally drawImage...
  3. Hi Folks, I am reading the documentation https://doc.babylonjs.com/how_to/render_scene_on_a_png. But in my case, if I just want to take a simple screenshot, is there anyway to do it directly using html5 APIs? I know that we have drawImage function but it seems to be used only for 2d canvas. How can I do it then? Thanks
  4. More details, I am developing the "viewer" component and I need to provide it as a React Component to the front-end team. Is there any example? Or is there any instruction?
  5. Hi Luaacro, Hum...finally I integrated SAO (https://threejs.org/examples/webgl_postprocessing_sao.html) in my App.
  6. Hi Folks, I saw in the github that we had "[viewer] - Add support for React.js #3077" (https://github.com/BabylonJS/Babylon.js/issues/3077). What is it exactly for? I am asking because I am considering using React as the UI framework of my App. Another question is what is the "viewer" here stand for?
  7. Is there a built-in way to apply a smooth animation on the active camera, given a start position, orientation, a final position, a final orientation and time frames?
  8. As the title describes...I would like to have per pixel value...
  9. Yeah although I have written any GL low level code for a very long time... The great thing is that we can avoid re-render the "main scene". We can just re-render some overlay layers and compose them easily in the post pipeline.
  10. It seems that when isReady returns true for a material, the texture is not necessarily ready. It needs to render several frames more to have the texture displayed...
  11. Yeah...that what I had noticed. In my opinion, if we could manage to support that feature, babylonjs would become much more powerful...
  12. I need to render several meshes into a custom render target (for later compositing in the post process pipeline). But I need them to use the same depth buffer as the normal meshes too. Is there a way that they share the same depth buffer? For now, what in the custom render target is always on the top because they will not be discarded by the depth test...
  13. I found one thing we might be able to optimize. In PBRBaseMaterial.bindForSubMesh(), we do this._afterBind(mesh); while in StandardMaterial.bindForSubMesh(), we do this._afterBind(mesh, this._activeEffect); The active effect is actually never cached for PBR materials. So for PBR materials, var mustRebind = this._mustRebind(scene, effect, mesh.visibility); returns always false. Which leads to wasting a lot of time on rebinding stuff...
  14. I have two questions. 1. On the first screenshot, why do I have such enormous "idle" time? It seems that it is even longer than the "render" function itself. How can I improve that? 2. On the second screenshot, it seems that PBRBaseMaterial is too much time-consuming. How can I reduce that? Is this time related to frequent shader program switch?
  15. Setting maximum and minimum directly does not update the interval vectors and yet...we have some algorithms based on those vectors such as inFustum(). This can lead to bugs which are really hard to detect...
  16. I have already FXAA always on though...hum...can MSAA be turned on/off dynamically? I think we might need to recreated all the render targets which is ...quite heavy, right?
  17. I am just curious if it is possible to implement such a thing just like all the ray-tracer does. Can someone give me any suggestion?
  18. https://threejs.org/examples/webgl_postprocessing_sao.html
  19. But I think SSAO2 is much more time-consuming than the SSAO right? I used to have scene which ran 60 fps with SSAO but only with 48 fps with SSAO2. BTW, do we have plan to implement SAO (scalable ambient obscurance)? I think THREE.js has it.
  20. I think you can use a customized acceleration structure like BVH...