In recent years, the number of accessories and headwear purchased on the Internet has been increasing, and at the same time, the percentage of product returns has not decreased. One approach to solving this problem is virtual fitting rooms. Accessibility to the online fitting system for accessories and headwear and the quality of fitting are important criteria for users. Existing systems for online fitting have shortcomings with occlusions, reflection of lighting and shadows, and the accuracy of reproduction of goods on a person in relation to the environment. The article is devoted to solving the problem of online fitting of accessories and headgear to a person with the appearance of shadows and lighting on a 3D model due to the use of neural networks. A method is proposed that simulates high-quality human stocking with a high number of frames per second, the ability to play from any device with a web browser, and low CPU and GPU requirements. The algorithm prototype has advantages compared to 2D counterparts: 3D lighting, dynamic change of its brightness, shadows, virtual environment and reduced occlusions. Created a virtual online fitting using augmented reality – MLight-VTON. It is noted that based on the proposed method and the Three.js library, trained TensorFlow.js models can be added to further improve tissue deformation and body segmentation.