To get the true ending, you must collect all memory shards in the game. There are a total of 35 in the world and they can only be collected at night. It takes 15 real life minutes for the game to cycle night and day times. Every outside area has a memory shard except for the boss areas, there is none in the castle.
After you beat the game, do not be worried that your achievement didn't unlock. You must actually sit through the entire credits. You cannot skip them as there is no option to. The credits will take roughly 10 minutes to finish.
For a guide to find them all, check below: