having conditionals in the shader degrades performance (apparently). what if we made ~4 different shaders and then compiled them then created materials for each of the particle groups at startup and then had the UI swap between materials rather than create new ones all the time.
having conditionals in the shader degrades performance (apparently). what if we made ~4 different shaders and then compiled them then created materials for each of the particle groups at startup and then had the UI swap between materials rather than create new ones all the time.
Do something like:
viewerParams.partsMaterials = {'PartType0':[defaultShader,velocityShader,columnDensityShader]}
or maybe a dict
{'Partype0':{'default':defaultMaterial, 'velocity':velocityMaterial, etc.