Organize dim update from one function
Organize dim update from one function

Instead of changing the alpha value from different locations, It
grouped in one single function.

CosmicMind/Material,CosmicMind/Material,CosmicMind/MaterialKit,CosmicMind/MaterialKit