Encapsulate the texture sampling logic and reuse in the "attenuate hit" function
Encapsulate the texture sampling logic and reuse in the "attenuate hit" function