I've been working on a raymarched project in three.js for a little over a year now and as the complexity has increased so has the initialization time. It can now take over 40 seconds to load the project in browser however once loaded runs at +60fps. I've tracked down the culprit function through performance tests and it seems to get hung up on the InitMaterial function within three's library. Does anyone have any idea as to what could be causing this hangup? Personally I believe it could be due to the amount of uniforms we use in the shader as there are quite a few of them.
You can find the code in question here. Note that the globalsinclude.glsl is where the list of uniforms is.
globalsInclude.glsl? I don't think it's auniformquantity issue, but maybe a very largeattributeproblem. Also, is this the link to the live version michaelwoodard.net/hypVR-Ray ? If so, I'm only experiencing a 10s delay, but it's expected that it would vary from one machine to another.