google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.78k stars 1.89k forks source link

RenderTarget::Builder example #2713

Closed dsafa22 closed 4 years ago

dsafa22 commented 4 years ago

I want to know mush about the use of RenderTarget.

But there is no samples.

Such as I want to render a view in offscreen RenderTarget and then render the offscreen one in screen RenderTarget. Because I will render the offscreen one in other graphic engine.

prideout commented 4 years ago

You can look at lucy_bloom.cpp or sample-gltf-bloom/.../MainActivity.kt at this commit but yes we should provide a simple demo. (These demos were removed after we implemented a proper bloom system within Filament itself.)

prideout commented 4 years ago

Here are links to the source files that I mentioned:

lucy_bloom.cpp

sample-gltf-bloom/.../MainActivity.kt

prideout commented 4 years ago

Because I will render the offscreen one in other graphic engine.

What's the other graphic engine? What are you trying to achieve? Filament's RenderTarget API is meant for when you use Filament to render, not an outside engine.

dsafa22 commented 4 years ago

Thanks a lot!

dsafa22 commented 4 years ago

Because I will render the offscreen one in other graphic engine.

What's the other graphic engine? What are you trying to achieve? Filament's RenderTarget API is meant for when you use Filament to render, not an outside engine.

I use Filament's RenderTarget to render 3D object to offscreen FrameBuffer.

And I render the FrameBuffer texture to other graphic engine.

That is my purpose.

Simply : Filament to render. Other graphic engine render to screen.

dandingol03 commented 2 years ago

Because I will render the offscreen one in other graphic engine.

What's the other graphic engine? What are you trying to achieve? Filament's RenderTarget API is meant for when you use Filament to render, not an outside engine.

I use Filament's RenderTarget to render 3D object to offscreen FrameBuffer.

And I render the FrameBuffer texture to other graphic engine.

That is my purpose.

Simply : Filament to render. Other graphic engine render to screen.

HI, i met the same need. How can you make offscreen-rendering work. i use the importTexture api to convert a opengles texture to filament texture, and regard it as color attachment of render-target.However, i didn't make it. Is it convinient for you to share you core or demo? thanks.