Exposing objects ( THREE.WebGLObjects ) for faster target rendering
See original GitHub issueI was looking into a faster way to render fbos into rendertarget using the renderBufferDirect threejs method. Got it working
this.renderer.setRenderTarget( prop.output );
this.renderer.objects.update( prop.mesh );
this.renderer.renderBufferDirect( this.camera, null, prop.mesh.geometry, prop.mesh.material, prop.mesh, null );
But it needs this object : https://github.com/mrdoob/three.js/blob/dev/src/renderers/WebGLRenderer.js#L286
to be exposed as a property of the renderer in order to update buffer attributes.
It could help to render objects and fbos immediately without using the whole render function. And also help to speed up post-processing effects method !
Is it worth exposing it ?
Three.js version
- Dev
- r81
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- Linux
- Android
- IOS
Hardware Requirements (graphics card, VR Device, …)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:14
- Comments:10 (2 by maintainers)
Top Results From Across the Web
third_party/blink/renderer/modules/webgl ... - Google Git
#include "third_party/blink/renderer/bindings/modules/v8/webgl_any.h" ... bool WebGLRenderingContextBase::DeleteObject(WebGLObject* object) {.
Read more >WebGL Specification - Khronos Registry
This specification describes an additional rendering context and support objects for the HTML 5 canvas element [CANVAS].
Read more >Three.js Render Targets
A render target in three.js is basicaly a texture you can render to. After you render to it you can use that texture...
Read more >WebGL Workshop :: @Xavier_Ho - GitHub Pages
THREE.WebGLRenderer creates a rendering context for us to add ... [Exposed=(Window,Worker)] interface WebGLSampler : WebGLObject { }; ...
Read more >WebGL - Real-Time Rendering
The visual capture handles all the possible renderable outputs such as cube textures, 3D textures, draw buffers, render target texture, render buffers and ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I wouldn’t expose it directly… Maybe build an API on top of it?
renderer.getInternalProperty( value )?@mrdoob I do not recommend to open up the renderer in the suggested way. The more internals are exposed (even via methods), the harder will it be to refactor and optimize the renderer in the future since users will rely on certain assumptions.
I think it’s better when above uses cases are realized when projects fork and modify the renderer according to their use cases.