fix crash
add option to optimize out parameters that do not contribute to the lighting (because of neutral values).