The various shader variants were always cumbersome and redundant. From a performance perspective, including acceleration in the shader was probably never a major factor. At least, some vertex shader matrix multiplications do not justify the exponential repetition of shader code.
Further, relativity is a "second order theory." Someone pointed out to me, if we include second partial derivatives, (effectively acceleration handling,) with the Unity update loop effectively making for a finite difference time step simulation, we should be able to fully represent the mechanics, by varying first and second order terms with a small enough time step. It goes beyond the scope of the original project, but acceleration handling certainly appears to work correctly, playing with it.
I wanted to use toggle options for lighting effects, but Unity's handling for enabling/disabling shader passes feels clunky. This reduced number of variants might be the best compromise.
Additionally, since we have the "isStatic" flag on RelativisticObject instances now, we know that world-static objects can share all material parameters, and therefore share a material! We can batch static environment objects, and bake lighting on them, too!
The various shader variants were always cumbersome and redundant. From a performance perspective, including acceleration in the shader was probably never a major factor. At least, some vertex shader matrix multiplications do not justify the exponential repetition of shader code.
Further, relativity is a "second order theory." Someone pointed out to me, if we include second partial derivatives, (effectively acceleration handling,) with the Unity update loop effectively making for a finite difference time step simulation, we should be able to fully represent the mechanics, by varying first and second order terms with a small enough time step. It goes beyond the scope of the original project, but acceleration handling certainly appears to work correctly, playing with it.
I wanted to use toggle options for lighting effects, but Unity's handling for enabling/disabling shader passes feels clunky. This reduced number of variants might be the best compromise.
Additionally, since we have the "isStatic" flag on RelativisticObject instances now, we know that world-static objects can share all material parameters, and therefore share a material! We can batch static environment objects, and bake lighting on them, too!