[BUG] refraction doesn't work if compile directly with material attributes

Original bug: https://answers.unrealengine.com/questions/1046/bugrefraction-in-material-layer-doesnt-work-if-con.html


As of 4.25.1, this bug still exists in a different form:

To reproduce:

  1. create a material asset
  2. Tick “Use Material Attributes”, DONT SAVE and COMPILE!
  3. connect your node to albedo, opacity and refraction, then to the output node.
  4. SAVE and COMPILE. no refraction!

(This test is done with raytracing enabled, but raytraced translucency disabled)

to workaround:

Create a normal material without ticking “Use Material Attributes”. then connect to the refraction slot, then compile. After this is done, you can freely use material attributes afterward.