Reflection captures and lightmaps

Hi, I have noticed UE4 multiplies the reflection captures with lightmaps. Why is it doing that? Is there a way to disable?

This breaks SSR since reflection captures will be much darker, dynamic objects stand out since their lighting is very different from lightmaps, etc…

Are you sure its the SSR and not the shader setup?

This is what I’m talking about:

In ReflectionEnvironmentComputeShaders.usf:


				#if USE_LIGHTMAPS
					// We have high frequency directional data but low frequency spatial data in the envmap.
					// We have high frequency spatial data but low frequency directional data in the lightmap.
					// So, we combine the two for the best of both. This is done by removing the low spatial frequencies from the envmap and replacing them with the lightmap data.
					// This is only done with luma so as to not get odd color shifting.
					// Note: make sure this matches the lightmap mixing done for translucency (BasePassPixelShader.usf)
					//Sample.rgb *= IndirectIrradiance;
				#endif

I just changed it using the source, but I’m wondering why the devs think this is a good idea…

For example, let’s say you a cube under a bridge where very little indirect lighting hits it which will result in a dark lightmap.

However that cube should reflect the sky in full brightness even though it doesn’t get a lot of indirect lighting.

Another thing is that the docs say: “The cubemap reflection is mixed together with the lightmap indirect specular based on how rough the material is”
However, the code does not take roughness into account…