1. An optical sensor, comprising:a sensing layer comprising an active area, a shading area around the active area, and a peripheral area around the shading area;
a first shading filter disposed on the shading area; and
a second shading filter disposed on the first shading filter,
wherein one of the first shading filter and the second shading filter extends from the shading area and is disposed over the active area, and
wherein when a light beam is emitted to the shading area, the second shading filter is configured to block a first component of the light beam, and the first shading filter is configured to block a second component of the light beam.