The results of Roughness=1.0 from a constant and from a parameter are different on 4.20.
The static bool switch of the following material always returns 1.0. But the results are different.
From 4.20, Statically constant 1.0 roughness is compiled as a "Fully Rough" material. But if the roughness value can't be decided at material compiling time, it isn't compiled as a "Fully Rough". As a result, generated shader codes are different. "Fully Rough" sets FORCE_FULLY_ROUGH to 1.
This happens from 4.20. Because the following code was added to 4.20 from Fortnite(CL:3883284).
I think the results shouldn't be different so I report this as a bug and attached a repro project.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-63635 in the post.