WIP Deferred Shading

@normen said:
Its not so much about the CPU than the GPU.

True, maybe I could survive it, I wasn't thinking :D

I can not wait to pick through your code for this… so much to pretend like I understand! This is absolutely great stuff!

@kwando said:
Ideally I would make some changes to the core classes.


:roll: Hell yeah!!!!!

Awesome! :smiley:

Throw it into the core already! :wink:

@nehon

I know there is some work done in JME for deferred shading… I can see references to GBuf technique for instance.



I’m wondering if someone already has thought through how it would fit into JME? Where changes has to be made etc.

yeah Momoko_Fan did a quick feasibility test like a year ago, but it was broken few commits later :stuck_out_tongue:

Nothing is settled though. I know the lighting shader has techniques to output the Gbuffer.



Everyone looks very excited about this but let me say a couple of things :

  • deferred rendering is cool for sure, but it’s not magic, there are cases where a forward rendering will be faster. It’s faster when you have several lights of course, but it has severe draw backs that has to be addressed : Anti aliasing (FXAA will help a lot of course but what if you want more?), transparency is kinda complicated to handle, shadows won’t work out of the box and so on.

    Of course there are solutions for this, but they have to be implemented, and thoroughly tested before this could be candidate to the core.


  • This is not something you can throw into the engine when it’s in a beta state, deferred rendering is planned for 3.1 and we’ll stick to it.

    Of course @kwando contribution is very welcome and i’m eager to see the code for this and test it myself, but please hold your horses everyone.
3 Likes

I’m not suggesting add it to the core at the moment (no rush), I was just wondering if there was a masterplan for it or not… if someone already thought of how to fight the problems that will arise in jme then I do not have to come up with my own solutions.



I know there is plenty of drawbacks with deferred shading. It does certainly not come for free and for smaller scenes (were we can afford rendering the same mesh many times) forward rendering is more flexible and performant.


@nehon said:
- This is not something you can throw into the engine when it's in a beta state, deferred rendering is planned for 3.1 and we'll stick to it.

By then I can hopefully provide some insights of how not to do it in JME :P
@nehon said:
yeah Momoko_Fan did a quick feasibility test like a year ago, but it was broken few commits later :p
Nothing is settled though. I know the lighting shader has techniques to output the Gbuffer.

Everyone looks very excited about this but let me say a couple of things :
- deferred rendering is cool for sure, but it's not magic, there are cases where a forward rendering will be faster. It's faster when you have several lights of course, but it has severe draw backs that has to be addressed : Anti aliasing (FXAA will help a lot of course but what if you want more?), transparency is kinda complicated to handle, shadows won't work out of the box and so on.
Of course there are solutions for this, but they have to be implemented, and thoroughly tested before this could be candidate to the core.

- This is not something you can throw into the engine when it's in a beta state, deferred rendering is planned for 3.1 and we'll stick to it.
Of course @kwando contribution is very welcome and i'm eager to see the code for this and test it myself, but please hold your horses everyone.


Again... (or the first time if I didn't say it yet), no rush, I don't and I think other guy don't...We also read a lot and see a lot of, some work a lot with deferred rendering. It just desert a chance to be in the core! :D

@kwando Yeah i was not answering to you directly, it was more to get things clear about the “get it to the core” ambiance :wink:



This looks really promising anyway, and I’ll gladly help if you need.

Btw for transparency, very often the solution is to “forward” render the transparent objects after the deferred rendering is done, but taking into account the depth buffer of the opaque objects.

You should look into the TranslucentBuckedFilter and how it’s handled by the filterPostProcessor. I did it to be able to render transparent object after depth aware post processing (fog, water,light scattering and so on), this could be adapted for the transparent bucket and deferred rendering.

Oooh, great looking video! It slipped by me until LWJGL tweeted about it :smiley: Nicely edited mate, thanks for the jME3 mention.

@erlend_sh Thanks alot :slight_smile:

Hey any updates on this? I still wait to test and see it on my own machine and play a bit around with it :).

Yeah, me², can’t wait to play with it.

I have been really busy lately. Finishing of my masters degree and finding somewhere to work. The only thing left is to find some place to live and a decent car, then it’s full speed ahead with this project again!



I will keep this thread updated when there is something new to tell or some when I’ve implemented a feature I wanna brag about :stuck_out_tongue:

5 Likes

Amazing stuff… The thread slipped me as well, thanks a lot for bumping it.

@kwando said:
I have been really busy lately. Finishing of my masters degree and finding somewhere to work. The only thing left is to find some place to live and a decent car, then it's full speed ahead with this project again!

I will keep this thread updated when there is something new to tell or some when I've implemented a feature I wanna brag about :P

Good luck finishing your masters degree, i finished mine about 3 weeks ago ^_^ and it feels good! :D, what subject did you study?
@wezrule said:
Good luck finishing your masters degree, i finished mine about 3 weeks ago ^_^ and it feels good! :D, what subject did you study?

Thanks, my master thesis got accepted last week, so I know the feeling. wonderful!! :)

I think the title of my programme is "Master of Science in Engineering, Computer Science and Engineering, specialized in Software in systems"... gonna need a widescreen business card ^^

What did you study?

hehe awesomes :stuck_out_tongue: I did Chemical Engineering

I have started to work with this project again now. For the moment I’m doing a big refactoring of my codebase which means for the moment my code is more broken than ever, but I can see the light in the darkness (or many of them :stuck_out_tongue: )



I also got a new plan on how to organize the rendering in jME which currently shows some promising results with far less code than before (me like).

3 Likes