This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
specular_lys [2017/05/15 21:56] adavies [Reflected Beam] |
specular_lys [2017/05/23 03:49] (current) |
||
---|---|---|---|
Line 133: | Line 133: | ||
Note that our implementation of BurleyToMip() below differs from the more typical form as cube maps convolved in Lys are based on RdotL and not NdotH. You can find a more detailed description in [[specular_lys#pre-convolved_cube_maps_vs_path_tracers|Pre-convolved Cube Maps vs Path Tracers]]. | Note that our implementation of BurleyToMip() below differs from the more typical form as cube maps convolved in Lys are based on RdotL and not NdotH. You can find a more detailed description in [[specular_lys#pre-convolved_cube_maps_vs_path_tracers|Pre-convolved Cube Maps vs Path Tracers]]. | ||
- | Despite the difference in distribution of MIPs the lit specular response resulting from the generated “roughness texture” will be identical to other PBR based game engines and tools. | + | Despite the difference in distribution of MIPs the lit specular response resulting from the “roughness texture” will be identical to existing PBR based game engines and tools. |
<code glsl>float BurleyToMip(float fPerceptualRoughness, int nMips, float NdotR) | <code glsl>float BurleyToMip(float fPerceptualRoughness, int nMips, float NdotR) | ||
Line 259: | Line 259: | ||
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ | \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ | ||
- | \\ 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> |