Method and device for rendering image
暂无分享,去创建一个
The invention discloses a method and device for rendering an image. The method comprises the following steps: determining a vertex lighting value of each pixel point of an image to be rendered, and an included angle between the lighting direction of each pixel point and the vertex normal direction; extracting a brightness template value of each pixel point from a preset lighting change template according to the value of the included angle between the lighting direction of each pixel point and the vertex normal direction; multiplying the difference, which is obtained by subtracting the vertex lighting value of each pixel point from the brightness template value of each pixel point, by a preset brightness adjustment coefficient, and then adding the vertex lighting value of the pixel point to obtain a final lighting value after the brightness is adjusted, and rendering the image according to the final lighting value. Through the method and the device for rendering the image, the image is more real, and the display effect is more three-dimensional.