No doubt the racism played a part. I don’t think though that if the Japanese soldiers behaved like the German soldiers on surrender from the start that they would have be met with such brutality by the allies. The personal accounts from allied soldiers all have descriptions of Japanese soldiers feigning surrender or death in order to kill more of their enemy. I don’t see how anyone could watch an enemy kill their buddy when their buddy was trying to help that enemy, and then be expected to try and help another enemy.  

I still think the behavior of the troops was more impactful than the racism in the brutality in that war. Even the Germans and soviets took hundreds of thousands of each other’s soldiers as prisoners, they were not all liquidated on the field and that was a war of racial supremacy. Both of those armies were known to be “fanatical” but even then they still didn’t engage in the same tactics as the Japanese on such a large scale. Incidents occurred but it wasn’t as prevalent, at least from what we can understand from the first hand accounts. 

To be fair to them they were an army from a different culture with different values that had less than 100 years ago not been involved in any European style wars. The laws of European warfare took centuries to establish with prisoner treatment and even then many European nations were still quite brutal to POWs. When they fought the Russians in 1905 the leadership tried, and to a certain extent succeeded in leading the troops in a “gentlemen’s” style war. This was a concerted effort to improve the prestige of japan and gain respect from the other great powers. Once Japan became a pariah state and no longer cared for the opinion of the great powers the leadership stopped making such an effort. Some individual generals did, but some did not and they didn’t always have power to stop low level atrocities. The difference between the nazi atrocities and the Japanese ones was that the nazi killings were very top down. Hitler and the SS ordered the killing of certain groups. The Japanese high command didn’t really do the same thing, but they didn’t try hard enough to stop it either. The imperial Japanese army was much more of an ancient army in the sense that the soldiers seemingly had insane bloodlust that was not quelled or disciplined out of them by leadership as it is in most modern armies.