Per-Pixel Lighting

Source: Internet
Author: User

The simplest illumination is to calculate the illumination based on the illumination model and normal in vertex shader. This method cannot realize the surface details of an object well. Later, we produced the Per-pixle lighting, which postponed the computing of illumination to each pixel. The familiar bump mapping is a PPL technology. However, although PPL is good, an additional concave-convex ing graph is required, and the model itself also needs to calculate the binormal or tangent vector. Previously, when we read 3ds, we found that we didn't even have normal. We only calculated it by ourselves (see how to export the 3ds model and then calculate the normal ). It's so tiring to compute another vector. However, we can calculate the tangent directly in pixel shader according to the christian schuler method. The method is good. The following is a Demo of the effect:

Refer:

[1] Christian schted, Normal Mapping Without Precomputed Tangents.

[2] Tomas Akenine-moller, Eric Haines, Naty Hoffman, Real-Time Rendering 3rd.

[3] Jim Blinn, Simulation of Wrinkled Surfaces.

[4] Philip Taylor, Per-Pixel Lighting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.