[Request] Make materials more like blueprint classes

Objects like cameras are common in rendering, as to take a world and project it into screen space you need to know things such as camera position/rotation for building a WVP matrix. But the camera would not be passed through as an actor, its members would be passed through as parameters. You can already use your own parameters, those parameters just cannot be actors; a GPU cannot evaluate a pointer like the CPU does.

Materials and shaders are very expensive by nature, and you should be using dynamic materials as little as possible. At most, the calculations done by a dynamic material could be processed once for each and every pixel on the screen every frame. I don’t think blueprint is nearly optimized enough to be handling that much work.

The GPU is not faster than the CPU, it is actually much slower. The only reason the GPU can calculate vertices/pixels/particles faster than a CPU is because a CPU typically has 1-16 threads whereas the GPU can have hundreds. This makes the GPU very good at doing small operations over a large number of elements in parallel, but also very poor at evaluating conditional statements. Conditional statements deteriorate GPU performance very quickly.