WIP Deferred Shading

Yes its not the scaling its something constant that might be optimizable. I get neraly the same performance with 1 or 3k lights.

Yes, I also see few things that can be optimized somehow.



However, I agreed with what @kwando said that he still want to re written the code structure, and also the of cycle this deferred technique in jME.



First is to split that big AppState.

Second is to work on the way to construct the lighting pass, which render all the light (now without shadow)…

Third, I still think we have to change the Renderer and also the Material class to get Deferred Shading works better!



Since Renderer do the most important job in jME rendering. It has to know how to group and sort out that bunch of object to send to GL to render. I remember that I 've read one or two NVIDIA articles about the problem of tranditional forward rendering cycle, and what should to in a deferred one.



And forget to say BIGGGGGGGGGGG THANK to @kwando , you’re the man!!! Appreciated! . Gonna play with this code this weekend !

Yes, do we already have a git somewhere or should i set one off? (also a wiki where we can document stuff) so we have all the same version when we start refactoring?



My first step i want to do is, to sperate the lights with all needed data into objects that are as easy to use as the default lights.

1 Like

Whats with the git all the time? We have a contributions SCM… And its even compiled each night :slight_smile: http://jmonkeyplatform-contributions.googlecode.com

well the branch and merge is superior, if you are not too used tosvn already it is far nicer to use.

@EmpirePhoenix said:
well the branch and merge is superior, if you are not too used tosvn already it is far nicer to use.

Yes but thats not the point, its that people should be able to find it in a central location :) At some point we'll migrate to git as well but for now its much easier for us as well to evaluate the code if its in a repo we also have access to. And no, we don't want to have logins/accounts for 10 different repos to change stuff over all of them. :/ Also again, git doesn't compile.

Well yes i agree with that, do I have commit rights ? (and the others?) then doesnt matter at all what we use i guess. main point is that we have a central point so not everyone does the same multiple times.

@EmpirePhoenix said:
Well yes i agree with that, do I have commit rights ? (and the others?) then doesnt matter at all what we use i guess. main point is that we have a central point so not everyone does the same multiple times.

Exactly :) Sure y'all can get commit rights. Just PM me with your google mail.

If you make a SDK plugin project to wrap the jar as a SDK/NetBeans library you can trigger the build of any ant-based java project that you committed as well, you will just have to commit the jme libs along with it but theres enough space. Its handled like that so libraries are not forced to use the most current version of jme. So if your code was created in the SDK, set "store libraries in project folder" in the project settings before committing.

This is what you gotta do to make a simple wrapper plugin for a jar: https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:development:extension_library Note that the actual plugin project doesn't need to have code really, it just references the "J2SE" library for the SDK.

Edit: Any tangible reason for not doing this from the guy downvoting me? Or are you just afraid of talking?

Nope, there is no repository (just on my private git server). I guess we can use the Contribution Repo although I’m more comfortable with the git as a SCM.

(I’l probably create a local git repo inside my private svn workspace anyways :P)



Sounds like you guys got some ideas already, which is good!





I hope it will come something good out of all this :slight_smile:

As long as no changes are made to the core using the contributuins smc is fine, but once you have to dig a bit deeper you need to fork the core. There a things which are not possible in contributions.



This is a basic design questions. How integrated the deferred stuff will be. (Should you need to rewrite a lot of code if you intend to switch to deferred rendering, or should you basically just set a flag in the AppSettings). For the long term, i think modifying some core files will be inevitable.

For such cases git has a way better branch/merge ability.



Back to topic, here is a desription and some code on how to implement deferred shadowmaps. Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.



If i find some freetime or got sick trying to get the transfom feedback stuff working i would also like to contribute a bit on this project

Well so we need a external source controll, that allows us to copy current jme into it, and then works detached from the core for some time (with periodic refreshs), that indeed is a task for git.





Well i just got ahead and created it:



https://github.com/empirephoenix/JME3D

→ Initial commit currently pushing, containing the unmodified project as from the dl link, and jme in revision 9692

Also for eclipse already configured. Someone using netbeans/sdk plz set the projects correctly up for it, thanks



Checkout should work public, for write acces just tell me your git username and i will invite you.

(No public write because there are to much dicks on the internet, :confused: )

Good, I was just going to do that :stuck_out_tongue: My name is kwando (big surprise) on github.

Great, you are added, now we just have to wait for the initial commit. as it is around 300mb or something with jme in it.

Got a confirmation email and already cloned the repo, just waiting for the code to show up…

Just for kicks I tried the zipped demo on my Linux + GT520 card. It is a halfway modern card but dog slow usually. Actually got surprised that the test scene render around 15 fps in 1920x1080 fullscreen - that is really not bad at all.

Going down to about 960x540 I get around 30 fps, this is gonna be fun :slight_smile:

finished pushing,

github username: zzuegg

btw, we should somehow plan the overall design not that everyone starts going it’s own way right at day 1 :wink:

I totally agree, we can use the wiki on github for that i suppose,.



I think it would really help if @kwando could find the time to make a rough general flowdiagram or list or something on how the current renderer works.

Sure, I can write something up tomorrow morning. I will put it on the wiki.



What parts of it is of most interrest?

2 Likes

good luck guys :slight_smile: keep up the good work, this will be an awesome addition!