## 3 Results and Discussion
### Composition, Morphology, and Structure Analysis
Such enhancements illustrate the importance of structural and compositional synergies in semiconductor photocatalysts, emphasizing how the interplay between component materials can significantly influence photocatalytic outcomes. Figure 3: Scanning electron micrograph of (**a**) porous g-C\({}_{3}\)N\({}_{4}\); Digital photographs of (**b**) composites with diverse ratios; Scanning electron micrograph of (**c**) CdS/ g-C\({}_{3}\)N\({}_{4}\)-1, (**d**) CdS/ g-C\({}_{3}\)N\({}_{4}\)-2, and (**e**) CdS/ g-C\({}_{3}\)N\({}_{4}\)-3. The XPS analysis provided insights into the elemental makeup and surface chemical properties of CdS/g-C\({}_{3}\)N\({}_{4}\)-2. The composite primarily consisted of five elements: N, C, Cd, S, and O (Figure 5a,b). Oxygen may stem from the oxidation of active edges in the porous graphitic phase carbon nitride by atmospheric oxygen or from the surface adsorption of water and oxygen molecules on the material. The compositions of the composites were consistent with the expected results, indicating that the porous g-C\({}_{3}\)N\({}_{4}\) and CdS semiconductor particles were bound to each other by simple in situ chemical precipitation and no impurity components were introduced. The fine spectra of C, N, Cd, and S were further analyzed by peak deconvolution. Figure 5c illustrates the C 1s spectrum, where a signal at 284.6 eV is associated with C-C bonding in carbon atoms, and the 288.2 eV signal is indicative of a C=N-C linkage. This pattern reflects the presence of sp\({}^{2}\)-hybridized carbon, a feature typical of the tri-s-triazine structure in carbon nitride. A peak at 286.5 eV for carbon was assigned to a C=N sp\({}^{3}\) carbon species, likely originating from defects within the porous g-C\({}_{3}\)N\({}_{4}\) structure. The N 1s spectrum displayed in Figure 5d reveals a peak at 398.2 eV, associated with nitrogen atoms in the C=N-C configuration of the tri-s-triazine unit [30], which aligns with the C 1s spectrum and confirms the stable structural integrity of carbon nitride. The 400.0 eV peak represents nitrogen within the amino group (N-H). The abundance of nitrogen defects facilitated the compounding of metal semiconductors and the stabilization of composites. The higher peak of 404.5 eV was caused by the \(\pi\)-\(\pi\) vibration of graphitic phase carbon nitride. The higher intensity of the \(\pi\)-excited peak enhances the effective mobility of photoinduced holes [31] and electrons [32], which can further promote the catalytic degradation of organic compounds [33,34]. The Cd 4d fine spectrum in Figure 5e showed that Cd mainly existed in two forms, Cd 3d\({}_{5/2}\) and Cd 3d\({}_{3/2}\)[35], on the composite surface, cadmium predominantly exists in its ionic state, with binding energies recorded at 405.6 eV and 412.4 eV, respectively. The spin-orbit splitting of the Cd 3d orbitals was determined to be 6.8 eV, aligning closely with prior findings, which reported a value of 6.74 eV for bulk CdS. The fine spectrum of sulfur shown in Figure 5f displayed two primary characteristic peaks at 161.5 eV and 162.8 eV, each corresponding to sulfur in the S\({}^{2-}\) state, which aligns with the form of Cd ions present. This suggests that the predominant form of both Cd and S within the composite is CdS. The S fine spectrum exhibited a minor feature near 168 eV, attributed to sulfur atoms located at the edges of the CdS layer. These edge atoms are believed to function as catalytic sites, enhancing the material's ability to degrade contaminants. Figure 4: Nitrogen adsorption–desorption isotherms of (**a**) porous g-C\({}_{3}\)N\({}_{4}\) and CdS/g-C\({}_{3}\)N\({}_{4}\)-2 and corresponding pore size of (**b**) porous g-C\({}_{3}\)N\({}_{4}\) and CdS/g-C\({}_{3}\)N\({}_{4}\)-2 distribution.