SoftPixel Forum

Official community of the SoftPixel Engine and the SoftPixel Sandbox (REGISTRATION only with consultation with the Admin)
It is currently Sun Feb 25, 2018 9:54 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Deferred Renderer
PostPosted: Sun Sep 16, 2012 12:05 pm 
Offline
Site Admin
User avatar

Joined: Sat Jul 07, 2012 5:58 pm
Posts: 540
Location: Germany
Hi folks,
I'm currently working on a deferred renderer using Cg shaders and GLSL (becuase there are problems with Cg on AMD cards).
I will integrate this right into the engine. Following features are planed:
  • Normal Mapping (done)
  • Parallax-Occlusion Mapping (done)
  • Shadow Mapping (in progress)
  • Bloom Filter (done)
  • Tessellation (not yet implemented)
  • HDR Rendering (not yet implemented)
  • Dynamic and Static Lighting combination (done)
The most complex things will be shadow mapping and HDR rendering. It's also the first time for me to implement HDR rendering.

Here is the first screen-shot of the shader-debug-output:
Image

And this is all you have to do:
Code:
// Create the deferred-renderer
video::DeferredRenderer* DefRenderer = new video::DeferredRenderer();

// Generate the resources with optional features
DefRenderer->generateResources(
    video::DEFERREDFLAG_NORMAL_MAPPING
    | video::DEFERREDFLAG_PARALLAX_MAPPING
);

// Use suitable vertex format
scene::SceneGraph::setDefaultVertexFormat(DefRenderer->getVertexFormat());

// Load your scene created with the sandbox editor ...

/* ... */

DefRenderer->renderScene(spScene);


I'm also planning to integrate that into the sandbox editor to make it more to a WYSIWYG editor.

_________________
My latest project:
- The XièXiè Programming Language

My hardware:
- GIGABYTE GeForce GTX 670
- Intel Core i7 (Ivy-Bridge)
- 16 GB DDR3


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Mon Sep 17, 2012 11:45 am 
Offline

Joined: Sat Jul 14, 2012 3:50 pm
Posts: 89
Location: Germany
This looks really good. It seems also to be used very easily. Very useful for those who are unable to program your own shader.

In the bottom left corner, what is this texture? A kind of Lightmapping, maybe?

If you plan more effects to integrate, take a look here (EVOLVED) for inspiration. This guy has written some cool effects for an other engine. Maybe you can translate and implement some of them. ;)

_________________
SPE 3.2 alpha (rev.119) (OpenGL), Win7, Intel E6600 2.4GHz, 6GB, nVidia GTX 560 1GB


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Mon Sep 17, 2012 1:16 pm 
Offline
Site Admin
User avatar

Joined: Sat Jul 07, 2012 5:58 pm
Posts: 540
Location: Germany
These shader effects looks really good, but nothing new for me ^^
I've completed the bloom-filter today and I will upload more screen shots soon.

The bottom-left image shows the pixel position (XYZ) in global space. This is the result of converting the depth-distance into a 3D coordinate.
This is similiar to what Crytek has done in FarCry or Crysis. They're no longer storing the pixel-depth (in the range [0.0 .. 1.0]) but the pixel-distance to the camera (in the range 0.0 .. [Far-Plane]).
This is not really slower but takes some advantages in converting the depth back into a 3D coordinate.

_________________
My latest project:
- The XièXiè Programming Language

My hardware:
- GIGABYTE GeForce GTX 670
- Intel Core i7 (Ivy-Bridge)
- 16 GB DDR3


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Fri Feb 01, 2013 5:07 am 
Offline

Joined: Fri Feb 01, 2013 5:05 am
Posts: 2
Hi! I really like your page very much. It contains a very usefull information. Thanks

_________________
FSL:


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Wed Mar 20, 2013 12:48 pm 
Offline
Site Admin
User avatar

Joined: Sat Jul 07, 2012 5:58 pm
Posts: 540
Location: Germany
A few weeks ago I've started with Real-Time Global Illumination (or rather Reflective Shadow Maps - RSMs).
Here are two screenshots showing the difference between normal- and reflective shadow mapping:

Without RSMs:
Image

With RSMs:
Image

This feature is already in the SVN rev. 125 and it only requires you to add the "DEFERREDFLAG_GLOBAL_ILLUMINATIO" flag
to the deferred-renderer initialization stage :D

_________________
My latest project:
- The XièXiè Programming Language

My hardware:
- GIGABYTE GeForce GTX 670
- Intel Core i7 (Ivy-Bridge)
- 16 GB DDR3


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Wed Mar 20, 2013 11:37 pm 
Offline

Joined: Wed Mar 20, 2013 11:22 pm
Posts: 1
Hi, I'm new to this forums and I'm very impressed about the features of your engine, it's looking really good and certainly I will give it a try.

BTW congrats for the global illumination aproach, what do you think about the Modular Radiance Transfer (MRT or DRT) here is a demonstration http://www.youtube.com/watch?v=WQIOs6M8gyM that technique presumes to run even on mobile devices, do you think it would be practical to implement for videogames or it's just not viable?


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Thu Mar 21, 2013 7:45 am 
Offline

Joined: Sat Jul 14, 2012 3:50 pm
Posts: 89
Location: Germany
@Lukas
Wow this looks really very good. But the FPS, uhhh!

_________________
SPE 3.2 alpha (rev.119) (OpenGL), Win7, Intel E6600 2.4GHz, 6GB, nVidia GTX 560 1GB


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Thu Mar 21, 2013 8:35 am 
Offline
Site Admin
User avatar

Joined: Sat Jul 07, 2012 5:58 pm
Posts: 540
Location: Germany
The DeferredRenderer itself can be used for games but the GlobalIllumination part is still in progress.
On my job at the FhGDI I'm currently working with Tile-Based Deferred Rendering to increase the performance with many light sources.
So the current screenshots show the GI part at it's very beginning without any optimizations ;-)

_________________
My latest project:
- The XièXiè Programming Language

My hardware:
- GIGABYTE GeForce GTX 670
- Intel Core i7 (Ivy-Bridge)
- 16 GB DDR3


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Tue Apr 30, 2013 12:45 pm 
Offline

Joined: Tue Apr 30, 2013 10:38 am
Posts: 1
One key disadvantage of deferred rendering is the inability to handle transparency within the algorithm, although this problem is a generic one in Z-buffered scenes and it tends to be handled by delaying and sorting the rendering of transparent portions of the scene

_________________
http://70432books.wordpress.com/
http://70462actualtests.wordpress.com/
http://9l0412passguides.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Deferred Renderer
PostPosted: Tue Apr 30, 2013 2:05 pm 
Offline
Site Admin
User avatar

Joined: Sat Jul 07, 2012 5:58 pm
Posts: 540
Location: Germany
This is absolutely correct. But what you can do is to make a hybrid of both forward- and deferred rendering.
First make the deferred render passes and then draw the transparent objects in a forward render pass with the depth information from the g-buffer ;-)

_________________
My latest project:
- The XièXiè Programming Language

My hardware:
- GIGABYTE GeForce GTX 670
- Intel Core i7 (Ivy-Bridge)
- 16 GB DDR3


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group