Fix for issue with environment probe reflections and lighting in 1.16 & 1.17

In Lumberyard 1.16 we introduced a change in the algorithm for compiling environment probes which resulted in unintentionally sharper and higher contrast reflections. We plan on reverting this change in 1.18 but if you want to apply the fix before then, here is how to do it:

  1. Setup your development environment to compile Lumberyard editor and tools

  2. Open dev/Code/Tools/RC/ResourceCompilerImage/Filtering/CubeMapGen-1.4-Source/CCubeMapProcessor.cpp in a text editor

  3. Rename roughnessSquared to roughness on line 1580

float32 cosTheta = sqrtf((1 - vXi[1]) / ( 1 + ((roughnessSquared * roughnessSquared) - 1) * vXi[1]));


float32 cosTheta = sqrtf((1 - vXi[1]) / ( 1 + ((roughness * roughness) - 1) * vXi[1]));
  1. Save and close the file

  2. Compile the RC module using lmbr_waf build_win_x64_vs2017_profile -p all --targets=ResourceCompilerImage

  3. Recompile your environment probe cubemaps by deleting your dev/Cache folder and then running the Asset Processor. NOTE: this will recompile ALL assets.