# Shadow Techniques demo

**URL:** <https://forums.imgtec.com/t/shadow-techniques-demo/1143>\
**Category:** PowerVR Insider\
**Created:** [July 29, 2011, 6:35am UTC](https://forums.imgtec.com/t/shadow-techniques-demo/1143 "2011-07-29T06:35:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![distantsuns](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@distantsuns](https://forums.imgtec.com/u/distantsuns)\
**Post date:** [July 29, 2011, 6:35am UTC](https://forums.imgtec.com/t/shadow-techniques-demo/1143/1 "2011-07-29T06:35:13Z")

</div>

I am going over the 1.1 demo, OGLESShadowTechniques looking at the FBO section. There is no explanation as to the derivation of the values in the glScale call:  
  
  
  
  
  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;glScalef(0.003f, 0.003f, 1.0f);  
  
  
  
  
  
Am I do assume that is just a total hack requiring the values to be hardcoded? And why is the UV space of the checkerboard face so tiny to require the FBO texture to be scaled down by so much?

---

<div class="post-metadata">

**Author:** ![distantsuns](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@distantsuns](https://forums.imgtec.com/u/distantsuns)\
**Post date:** [August 6, 2011, 7:54pm UTC](https://forums.imgtec.com/t/shadow-techniques-demo/1143/2 "2011-08-06T19:54:41Z")

</div>

distantsuns wrote:

I am going over the 1.1 demo, OGLESShadowTechniques looking at the FBO section. There is no explanation as to the derivation of the values in the glScale call:  
  
  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;glScalef(0.003f, 0.003f, 1.0f);  
  
  
  
Am I do assume that is just a total hack requiring the values to be hardcoded? And why is the UV space of the checkerboard face so tiny to require the FBO texture to be scaled down by so much?  
  

  
  
  
Arggh.!  
  
  
  
Should be: "Am I to assume..."  
  
  
  
No takers yet?

---

<div class="post-metadata">

**Author:** ![arron](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@arron](https://forums.imgtec.com/u/arron)\
**Post date:** [August 8, 2011, 2:51pm UTC](https://forums.imgtec.com/t/shadow-techniques-demo/1143/3 "2011-08-08T14:51:07Z")

</div>

Hi.  
  
  
  
  
  
If you look a few lines up from this function you’ll see that the model’s vertices are being used as texture coordinates in the call to glTexCoordPointer. As the model’s vertices are in the range of -100.0 to +100.0, the scale is required to reduce the UV size to something more appropriate (in the range of 0.0 to 1.0): using 0.003 is simply a magic number.  
  
  
  
  
  
Thanks for bringing this to our attention - I’ll comment this block of code appropriately.
