Distinguishing gross primary productivity (GPP) into sunlit (GPPsu) and shaded (GPPsh) components is critical for understanding the carbon exchange between the atmosphere and terrestrial ecosystems under climate change. Recently, the two-leaf light use efficiency (TL-LUE) model has proven effective for simulating global GPPsu and GPPsh. However, no known physical method has focused on integrating the overall constraint of intricate environmental factors on photosynthetic capability, and seasonal differences in the foliage clumping index (CI), which most likely influences GPP estimation in LUE models. Here, we propose the TL-CRF model, which uses the random forest technique to integrate various environmental variables, particularly for terrestrial water storage (TWS), into the TL-LUE model. Moreover, we consider seasonal differences in CI at a global scale. Based on 267 global eddy covariance flux sites, we explored the functional response of vegetation photosynthesis to key environmental factors, and trained and evaluated the TL-CRF model. The TL-CRF model was then used to simulate global eight-day GPP, GPPsu, and GPPsh from 2002 to 2020. The results show that the relative prediction error of environmental stress factors on the maximum LUE is reduced by approximately 52 % when these factors are integrated via the RF model. Thus the accuracy of global GPP estimation (R2 = 0.87, RMSE = 0.94 g C m−2 d−1, MAE = 0.61 g C m−2 d−1) in the TL-CRF model is greater than that (R2 = 0.76, RMSE = 2.18 g C m−2 d−1, MAE = 1.50 g C m−2 d−1) in the TL-LUE model, although this accuracy awaits further investigation among the released GPP products. TWS exerts the greatest control over ecosystem photosynthesis intensity, making it a suitable water indicator. Furthermore, the results confirm an optimal minimum air temperature for photosynthesis. Overall, these findings indicate a promising method for producing a new global GPP dataset, advancing our understanding of the dynamics and interactions between photosynthesis and environmental factors.