title: calculate light volume radius from intensity
body: <p>i am currently having a problem with calculating the light volume radius for a deferred renderer. On low light intensities the volume size looks correct but when the light intensity (and therefore the radius) increases, the light volume seems to be more and more too small.</p>
  
  <p>I am calculating the light volume radius (in world space) like this:</p>
  
  <pre><code>const float LIGHT_CUTOFF_DEFAULT = 50;
  mRadius = sqrt(color.length() * LIGHT_CUTOFF_DEFAULT);
  </code></pre>
  
  <p>I then use this value to scale a box.</p>
  
  <p>In my shader i then calculate the attenuation like this:</p>
  
  <pre><code>float falloff = 5;
  float attenuation = max(0, 1.0 / (1+falloff*(distance*distance)));
  </code></pre>
  
  <p>So obviously I am messing around with the math. The attenuation should be linear, right? But how do I now correctly calculate the world scale value for the light volume?</p>
  
  <p>P.S. the light color can go beyond (1,1,1) since I am planning to use HDR rendering.</p>