GSoC 2017: OpenGL Deffered Shading Tutorial

edited March 2017 in Summer of Code 2017

Hello, my name is James Muir. My current project idea is to create a tutorial for deferred shading using P3D and OpenGL shaders. I am also open to the idea of creating a different P3D OpenGL tutorial, such as a geometry or tessellation shader tutorial, if that would be more helpful. Any comments or suggestions?

Comments

  • edited March 2017

    If you could get any tutorial related to using shaders in Processing, this community will be grateful to you.

    If you're still interested, I'm sure @prince_polka and I shall give you a fairly large list of questions on how to use shaders and also link a few related threads on this forum.

  • Hi James, that's a great idea! An advanced shader tutorial and examples following up the introductory one currently available online would be a very useful resource for people using GLSL in Processing.

    A while back I wrote a few advanced shader (including geometry and tessellation) examples, which are in this GitHb repo, but never had the time to properly document them. These could serve as a reference for your proposal.

    I haven't really done anything related to deferred shading, but I know it is a very popular technique to render highly complex scenes. Do you have a working example of deferred shading in Processing? As far as I understand, you need to render successive passes into an offscreen buffer, so I'm not sure if the core API would allow doing this.

    Another very interesting and useful example would be a GLSL implementation of the Marching Cubes algorithm.

  • So all this while we had a guy who knew exactly how to use shaders in Processing, yet had to waste our time guessing??? Very sad, @codeanticode. Atleast a link to that same repo and we would've known what to do. :( X(

  • @Lord_of_the_Galaxy -- some community members are focused only on certain channels (like p5, or Arduino, or Google Summer of Code), and some only stop by occasionally. They aren't checking the entire forum daily, and so they wouldn't be aware that you had recent shader questions.

    Finding a late answer can be frustrating, but if codeanticode has written a personal repo of experiments and is now volunteering it for learning purposes then that is a kindness and a great opportunity.

  • edited March 2017

    (GoToLoop was right. You are very flowery, @jeremydouglass (no offence))

  • Thanks for the great input! I do not currently have an example of deferred shading in Processing. Deferred shading works best with Multiple Render Target support, so you don't have to do multiple passes over the scene geometry. I'm not sure if Processing provides that ability. I'll have to look into that. Thanks for the geometry and tessellation shader example code! I'm sure that will prove very useful. One other idea I had was a tutorial on how to render shadows. I think that could be quite useful as well.

  • MRT is not supported in the core API, but there is some underlying infrastructure that allows attaching multiple color buffers to a Framebuffer object. But taking advantage of that functionality in order to use MRTs would probably require to implement a new renderer library, although it could be largely based on the default OpenGL renderer.

  • Thanks for the info! It looks like it could work with a new/modified renderer library.

  • That could be a very nice proposal, specially if allows to combine MRT with other advanced shader techniques that I unfortunately haven't had time to document properly or support on the forum. For instance, if this library could also wrap the complexities of creating a shader effect involving geometry or tessellation stages, it would be super cool. Again, the repo I mentioned in this thread probably contains some useful code for that purpose.

    But you should look into the current renderer architecture and propose, at least in general terms, how you would go about adding MRT and other features.

  • edited March 2017

    Cool! So my current idea is to modify the OpenGL system to expose the MRT functionality, make it easy to implement geometry and tessellation shaders (examples by codeanticode), and to document my contributions to make it easy for anyone to use said functionality. This would involve reference implementations and proper explanations, which could be used as a tutorial.

  • Hope that you get it done on time. Best of luck!

  • @zyborg yes, it is a cool project, but also challenging, specially if involves implementing a new renderer library (although much of it could rely on the built-in OpenGL renderer). It also depends on how much experience you have with OpenGL and your familiarity with Processing's code. All of this should be described in the proposal.

    So try to come up with a plan that you can tackle in the timeframe of the GSoC, and we can adjust it based on what feasible based on your experience, and most useful for the community. If implementation of MRT is far too complex for a three months commitment, you can scale the proposal back to include geometry and tessellation shaders, and generally documentation/examples for advanced shader effects. Remember that the deadline for the proposal submissions in April 3rd (this coming Monday)

  • Thanks for the guidance! I'll post a link to the draft of my proposal shortly.

  • Here is the link to the draft of my proposal. Any comments or advice is greatly appreciated. :)

  • So I decided to focus on implementing geometry and tesselation shader support into the default renderer. I'll wait on MRT and deffered shading until that is finished.

  • I've updated the draft of my proposal.

  • Hi, thanks! I will go through it and add some comments.

  • @zyborg
    I wonder what code editor you use for writing GLSL?
    And do you know any code editor similar to the Processing IDE?

  • @codeanticode thanks for the input! I've updated my proposal to reflect your input.

  • @prince_polka I usually use sublime text for writing everything. I just really like its interface. As far as IDEs similar to the Processing IDE, I know that the Arduino IDE is actually based on the Processing IDE, so it of course is quite similar. As far as the ability to instantly run a sketch, the default Python editor IDLE is pretty similar, with instant run and debug abilities.

  • Well, unfortunately, it looks like I didn't submit my proof of enrollment in time. Misunderstood the deadline, apparently. Oh well. There's always next year.

Sign In or Register to comment.