Owing to their intrinsic properties, nuclear imaging systems based on room temperature semiconductor materials are still the topic of numerous research and development schemes. Due to their high atomic number and their high resistivity, CdTe and CdZnTe (CZT) have been used extensively in these systems, especially for astrophysics and medical applications. However, the shape of the electric field has always been poorly considered, i.e., assumed uniform, or with minor implications on gamma-ray spectra-and this is far from the real situation. Consequently, real electric field profiles measured by Pockels effect are presented in this work. Furthermore, we develop a formalism integrating non-uniform electric field profiles. Results are presented in term of energy resolution, which is of utmost importance in nuclear imaging, mainly for counting efficiency and contrast. Finally, the analytical results are completed and confirmed with Monte Carlo simulations. Contrary to generally accepted ideas, a real and non-uniform decreasing electric field can improve the energy resolution, especially for thick detector arrays. Therefore in "classical" simulations of nuclear detection the value of the parameter , which represents the charge transport properties, is excessive to "agree with the experimental data". This work gives an answer to this incoherence, and finally shows that realistic nuclear detection results can be simulated with realistic values and non-uniform electric field, with an example of geometrical optimization.