This application relates to the field of game technology, specifically to a rendering method, device, electronic device, and storage medium for a virtual
sight. The method includes: in response to an activation operation of the virtual
sight, calculating a
world space view vector and converting it into a tangent space view vector; in response to a view movement operation following a target virtual object, performing calculations within a target
shader based on the tangent space view vector to generate a crosshair layer and a
mask layer; in response to aiming at the target virtual object, sampling a spherical normal map on the
sight rendering model, and calculating a reflection vector based on the tangent space view vector to generate a reflection layer; and in the target
shader, performing pixel blending
processing on the three
layers, and displaying the virtual sight's
image based on the blending result. This approach, while making the optical effects more realistic, reduces redundant drawing and interaction, lowers runtime overhead, and improves image stability and aiming immersion by completing integrated rendering within the same
shader.