Arbitrary material coding replacement from V4.8 to V4.12? SM5 ERROR

I’ve got some arbitrary coding in the material editor but after update 4.8 to 4.12 it became invalid for reasons. However I’m uncertain what to replace the coding with, here’s the line that gives me the error: SM5 undeclared identifier ViewSceneSizeAndSceneTexelSize

float2 ScreenMult = View.ViewSizeAndSceneTexelSize.xy / Frame.RenderTargetSize;
int TexIndex = 14;
float samples[10]

If anyone who knows more about coding can help I would appreciate it.