Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use a renderbuffer as a texture in Elm's WebGL library

Tags:

webgl

elm

I'm using the Elm WebGL library found here to make webGL graphics for my website. I would like to use certain graphics techniques such as shadow mapping which require the ability to use the results of operations performed on the graphics card; a write to a renderbuffer backed by a texture, if I recall my OpenGL ES terminology correctly, which is then used by the shader which draws to the screen.

Looking in the API provided it doesn't look like doing this is possible, because the only thing in the API that can actually execute/hold the result of a WebGL pipeline/Entity is of type Element.

My question is if it is possible to use techniques like shadow mapping and SSAO which require more than one pass to draw the scene with the standard Elm WebGL library, and how I might accomplish this.

like image 519
Ben Pious Avatar asked Dec 19 '25 23:12

Ben Pious


1 Answers

Sadly, the answer is indeed: No, you cannot do multiple passes and generate textures using the graphics card yet. The WebGL library is pretty new, so this is a feature that was only requested for the first time 6 days ago on the elm-discuss mailing list.
The author of the WebGL library has yet to respond, but I expect the features described in the linked post will become available at some point.

like image 147
Apanatshka Avatar answered Dec 23 '25 07:12

Apanatshka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!