Hemodynamic shear forces modulate cardiac development, and wall shear stress (WSS) promotes the initiation of endocardiac trabeculation. Whether special (∂τ/∂x) and temporal (∂τ/∂t) variations in shear stress differentially modulate trabecular ridges and grooves to promote contractile function remains elusive. We coupled Selective Plane Illuminated Microscopy (SPIM) with Computational Fluid Dynamics (CFD) to recapitulate the 4-D fluid domains and spatiotemporal WSS (∂τ/∂x∂t) in the transgenic zebrafish embryos. We genetically manipulated trabeculation by 1) gata 1a oligonucleotide morpholino (MO) injection to reduce blood viscosity 2) ErbB2 inhibition to attenuate trabeculation, and 3) weak atrium (wea) mutation to arrest atrial contraction. The time-dependent ventricular volume was increased in response to gata 1a MO and ErbB2 inhibition, respectively, but decreased to wea mutation, accompanied with reduced ejection fraction, and after 4 days fertilization. Time-averaged WSS was reduced and in response to ErbB2 inhibition, Gata 1a MO, and wea mutation, whereas normalization of blood viscosity following gata1a MO restored time-averaged WSS. In the wild type, low time-dependent area-averaged WSS developed in the grooves where flow recirculation developed as supported by an elevated oscillatory shear stress index (OSI). As a corollary, energy dissipation was elevated in the presence of the trabeculation (wild type) as compared to the attenuation (ErbB2 inhibition) or absence (gata1a or wea mutation) of trabeculation. Elevated OSI up-regulated Notch-signaling related genes, and induced prominent Notch activity in the grooves in the double transgenic Tg Tg(Tp1:gfp; cmlc2:mCherry) line. Thus, our findings provide new endocardial mechanotransduction underlying WSS, OSI, and trabecular formation to optimize cardiac function.