r/JavaFX • u/Birdasaur • May 16 '23
Cool Project Custom Shader Support including Effects and Materials for JavaFX
https://github.com/Teragam/JFXShader/
8
Upvotes
r/JavaFX • u/Birdasaur • May 16 '23
View all comments
Show parent comment
1
u/OddEstimate1627 May 17 '23 edited May 17 '23
As far as I understand it's integrating directly with the JavaFX D3D pipeline and uses the NV_DX_INTEROP extension to draw into DirectX buffers.
You can then use LWJGL vertex buffers / shaders and old-style GL calls to render into a OpenGLCanvas node. I've done some tests that combine 2D drawings, e.g., a large number of points/lines drawn with LWJGL shaders on top of a grid w/ labels drawn in a JavaFX Canvas. The results were very good.
Combining 3D elements is harder due to separate z-buffers.