Question about jme rendering pipeline

I have been working on getting a better understanding of OpenGL, so I decided to begin writing my own primitive rendering engine. It has been a lot of fun and I have learned a lot. But everything I have been reading only has one shader (vertex+fragment) with the except of extra fragment shaders for post processing.

Having dabbled with jme shaders just a bit I kept thinking in my mind that I could have multiple vertex shaders because the different rendering techniques in the jme material definition each have their own vertex and fragment shaders, then there is the shader that for the default technique that is normally the one I would provide.

After some digging I have come to the conclusion that only the default technique is the one that is used, not the others. Is this correct?

I have not dug into any of the jme post processing yet, but I going to guess that it is mostly just a fragment shader run on the framebuffer?

Just trying to wrap my head around the OpenGL rendering pipeline in jme. I’m really still struggling with the lighting passes. I rendered a jme scene with RenderDoc to try to see what is going on, but the color passes in render doc seem to indicate that jme is redrawing the scene multiple times per frame. I dug around in the rendering code and did not see anything that would do that, but perhaps that is some of the lighting and postprocessing I have enabled doing that.

Any insight would be great!

Thank you,
Trevor

“Multipass lighting” is the default for JME. It renders that scene once for each active light and mixes them together.

JME also implements a single-pass lighting that you can set (I think on the renderer or render manager or something) with the number of lights per pass. In that case, it uses a different technique (Singlepass) and loops over the max lights in the fragment shader.

1 Like

Thank you for the information Paul, the pieces are starting to click together for me (I think).
Does jme support deferred lighting with a G buffer? What are the advantages of deferred lighting vs doing multiple lighting passes?

Only if you write it yourself.

Probably you should read some articles on deferred rendering versus forward rendering. Forward rendering is a lot simpler and performs fine with one or two lights… it also handles transparency in a reasonable way.

My understanding is that deferred rendering is better for tons of lights and in-pass shadows… but then you have to do extra tricks to support transparency and some kinds of atmospherics.

But google will be a better source of information.

2 Likes