Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
bubbafoo's avatar
bubbafoo
Explorer
4 years ago

Single camera position in UE4.26 material

As the title says, how can I get a single camera position within a material? The CameraPosition node returns the position of the left or right eye, and I can't find any custom HLSL that allows the calculation of the center point between the two eyes.

 

Apparently this custom HLSL worked in 4.19 but not any more; 

 

  1. (GetInstancedView().WorldCameraOrigin + GetPrimaryView().WorldCameraOrigin) * 0.5f

 

GetInstancedView(0).WorldCameraOrigin or GetInstancedView(1).WorldCameraOrigin returns the same result. 

No RepliesBe the first to reply