Engine problem with light

Good evening, faced with such a problem: there were problems with the construction of light and I decided to rebuild the file with Light.cpp as a result of what is wrong with shader … The light turned unclear how, please tell me. engine 12.5. 2 screenshots before/after