This proposal aims to study the microscopic stabilization mechanism of different charge density wave stacking schemes in the layered material 1T-TaS2. This material has a complex electronic phase diagram as a function of pressure and temperature which exhibits various CDW phases along with pressure induced superconductivity. X-ray diffraction (XRD) experiments have shown that not only the in-plane CDW order changes as a function of pressure and temperature, but also the stacking order of the CDW in the out-of-plane direction is affected. DFT simulations have identified S-3pz derived bounding states as central players in stabilizing the different stacking schemes in this material. However, direct experimental evidence for such a mechanism is yet to be found. Therefore, we propose to use the newly created possibilities at ID12 to study the behaviour of exactly these S-3pz states as a function of pressure and temperature by means of Xray-absorption near edge spectroscopy (XANES).