Maskless lithography, utilizing Digital Micromirror Devices (DMDs), holds great promise for next-generation semiconductor manufacturing due to its versatility and cost-effectiveness. A notable advantage of DMD-based maskless lithography is its capability to instantly generate arbitrary two-dimensional optical patterns. In this paper, we introduce a real-time deformation compensation method that leverages the unique feature of DMD lithography. This approach is designed to be suitable for specific lithography processes, particularly in cases where substrate deformations might occur, such as continuous roll-to-roll production. We implemented the compensation method on the system consisting of measuring and projection units. The measuring unit captures substrate deformations, and the projection unit then exposes the compensatory DMD patterns, which are calculated by shifting the coordinates within a sub-pixel grid based on the measured deformation. To handle the substantial computational load involved in real-time DMD pattern calculations, we employed CUDA technology. The results demonstrate that the presented technology effectively compensates for a spatial offset of 150 µm in the substrate, reducing patterning errors to 2.2 µm. Our successful demonstration of deformation-compensating maskless lithography establishes the feasibility of this approach. Our experimental results highlight the effectiveness of the system, achieving high overlay accuracy even in the presence of substrate deformations.