R_SetupEntityLighting in F# (untested).