Firefly icon indicating copy to clipboard operation
Firefly copied to clipboard

move conditionals out of shaders

Open agurvich opened this issue 2 years ago • 0 comments

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.

agurvich avatar Apr 13 '22 15:04 agurvich