User Tools

Site Tools


specular_lys

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
specular_lys [2017/05/15 21:53]
adavies old revision restored (2017/05/15 21:52)
specular_lys [2017/05/15 21:58]
adavies [Reflected Beam]
Line 257: Line 257:
 [{{https://​s3.amazonaws.com/​docs.knaldtech.com/​docuwiki/​reflected_beam_new.png?​nolink&​1075 |The view direction v reflected by dH will result in dR. Given the existing symmetry the central direction r of dR will result in dV when reflected by dH.}}] [{{https://​s3.amazonaws.com/​docs.knaldtech.com/​docuwiki/​reflected_beam_new.png?​nolink&​1075 |The view direction v reflected by dH will result in dR. Given the existing symmetry the central direction r of dR will result in dV when reflected by dH.}}]
  
 +\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ 
  
- +\\ \\ As an approximation we can correlate size of solid angle with "blur strength"​and replace ''​h_dot_r''​ with ''​n_dot_r''​. So ultimately what we do is adjust our specular power in the following way:
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ +
- +
-As an approximation we can correlate size of solid angle with "blur strength"​and replace ''​h_dot_r''​ with ''​n_dot_r''​. So ultimately what we do is adjust our specular power in the following way:+
  
 <code glsl>​fSpecPow /= (4*max(dot(vN,​ vR), FLT_EPSILON));</​code>​ <code glsl>​fSpecPow /= (4*max(dot(vN,​ vR), FLT_EPSILON));</​code>​
- 
- 
- 
  
 This works because the specular power is roughly inversely proportional to the amount of blur. This works because the specular power is roughly inversely proportional to the amount of blur.
- 
- 
  
 Note we perform this correction inside the functions GetSpecPowToMip() and BurleyToMip() given above. This adjustment is of course just for the cube maps and should NOT be applied to the specular power used with ordinary lights since for these we simply use an n_dot_h based formulation as opposed to l_dot_r. Note we perform this correction inside the functions GetSpecPowToMip() and BurleyToMip() given above. This adjustment is of course just for the cube maps and should NOT be applied to the specular power used with ordinary lights since for these we simply use an n_dot_h based formulation as opposed to l_dot_r.
specular_lys.txt · Last modified: 2017/05/23 03:49 (external edit)