The Klein-Gordon and Dirac equations in a semi-infinite lab (x > 0), in the background metric ds 2 = u 2 (x)(−dt 2 + dx 2 ) + dy 2 + dz 2 , are investigated. The resulting equations are studied for the special case u(x) = 1 + gx. It is shown that in the case of zero transverse-momentum, the square of the energy eigenvalues of the spin-1/2 particles are less than the squares of the corresponding eigenvalues of spin-0 particles with same masses, by an amount of mg c. Finally, for nonzero transversemomentum, the energy eigenvalues corresponding to large quantum numbers are obtained, and the results for spin-0 and spin-1/2 particles are compared to each other.