# DeferredShading Sample

**URL:** <https://forums.imgtec.com/t/deferredshading-sample/1819>\
**Category:** PowerVR Insider\
**Tags:** pvrshaman\
**Created:** [June 25, 2013, 8:07am UTC](https://forums.imgtec.com/t/deferredshading-sample/1819 "2013-06-25T08:07:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgu](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@dgu](https://forums.imgtec.com/u/dgu)\
**Post date:** [June 25, 2013, 8:07am UTC](https://forums.imgtec.com/t/deferredshading-sample/1819/1 "2013-06-25T08:07:39Z")

</div>

Dear Team  
  
  
  
DeferredShading is one of the top sample in the SDK, really beautifull for the usage of :  
  
cache of pUniformMapping  
  
Nice usage of PFX and custom semantic approach (more elaborate the intro Pfx demo , of course 🙂 )  
  
Quad Shading technique  
  
  
  
i tried to make it work with other Meshes but unfortunately the program render with gl error ,  
  
i would like to know that the bi-tangent calculation is mandatory (checked during the export ) and did you produce your mesh with not documented parameters ???  
  
will it be a good idea to put more information in your /Documentation/Whitepaper section about it ?  
  
  
  
is this technic more performant than a multipass rendering , and do you have a kind of benchmark on SGX mesuring this aspect ??  
  
regards  
  
david  
  
for good doc about the subject this link is interesting  
  
[http://download-software.intel.com/sites/default/files/m/d/4/1/d/8/lauritzen\_deferred\_shading\_siggraph\_2010.pdf](http://download-software.intel.com/sites/default/files/m/d/4/1/d/8/lauritzen_deferred_shading_siggraph_2010.pdf)

---

<div class="post-metadata">

**Author:** ![JoeDavis](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/joedavis/32/71_2.png) [@JoeDavis](https://forums.imgtec.com/u/JoeDavis)\
**Post date:** [July 2, 2013, 1:57pm UTC](https://forums.imgtec.com/t/deferredshading-sample/1819/2 "2013-07-02T13:57:33Z")

</div>

Hi David,  
  
  
  
Sorry or not answering this one sooner.

  
1. Yes, you need to export your meshes with tangents. The tangents are used to generate the GBuffer
  
2. Agreed. It should be better documented
  
3. Do you mean using MRTs vs. rendering in multiple passes? MRTs are more efficient, as vertex is only done once instead of _n_ times. We do not have any benchmark figures for this. You can get a rough idea by comparing the performance of the OGLES3 (with MRTs) and OGLES2 (without MRTs) version of this Example
  

  
  
Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![dgu](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@dgu](https://forums.imgtec.com/u/dgu)\
**Post date:** [July 2, 2013, 2:32pm UTC](https://forums.imgtec.com/t/deferredshading-sample/1819/3 "2013-07-02T14:32:08Z")

</div>

First of all , thank for your answer.  
  
what i mean was more about the usage of the GBUFFER , is it really efficient ?  
  
how did you prepare the assets for the demo ? (i mean any specific hidden parameter etc etc )  
  
  
  
i tried to reproduce from scratch ,but…wow not easy for me, and i know your tools a bit 🙂  
  
thank for the learning here  
  
  
  
david

---

<div class="post-metadata">

**Author:** ![JoeDavis](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/joedavis/32/71_2.png) [@JoeDavis](https://forums.imgtec.com/u/JoeDavis)\
**Post date:** [July 16, 2013, 8:10am UTC](https://forums.imgtec.com/t/deferredshading-sample/1819/4 "2013-07-16T08:10:10Z")

</div>

Hi David,  
  
  
  
Our Deferred Rendering implementation is completely optimized. However, the technique is only really worth using if you have many dynamic lights.If you only have a small number of lights in your scene, the additional computational overhead required for this rendering technique is unlikely to be worthwhile.  
  
  
  
The only difference between the parameters used for the assets in this demo and those used in others is that tangents have been exported. You can use PVRShaman to open the POD & inspect the data contained in it.  
  
  
  
Cheers,  
  
Joe

---

<div class="post-metadata">

**Author:** ![dgu](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@dgu](https://forums.imgtec.com/u/dgu)\
**Post date:** [July 16, 2013, 8:53am UTC](https://forums.imgtec.com/t/deferredshading-sample/1819/5 "2013-07-16T08:53:41Z")

</div>

thanks alot + the description you gave me help alot
