![]() Now let’s look at surfaces that do no behave like a perfect mirror. If light comes in at a 30° angle, it will be reflected at a 30° angle. When light hits a perfect mirror surface, the AoI and AoR are equal. It is sort of the opposite of the angle of incidence. ![]() The angle of reflection is the angle between the reflected ray, and the $$R$$ is new, and it represents the angle of reflection $$N$$ and $$I$$ are the normal and the angle of incidence (AoI), which we saw Let’s start by looking at how a mirror reflects light. Specular highlights) are fake reflections of light, like a mirror would reflect Means “like a mirror,” and it is used here because the shiny patches (a.k.a. The specular component is what makes a surface look shiny. This is the same as the diffuse component we implemented in the last article,Įxcept that we use light.ambientCoefficient instead of brightness (which is We covered the diffuse component in the previous article, but I’ve refactored Please let me know if you haveĪny issues compiling and running the code. The project includes all of its dependencies, so you shouldn't have to Windows, open the opengl-series.sln file in Visual Studio 2013,Īnd open the project that corresponds with this article. ![]() Root folder, and select the target that corresponds with this article. On OS X, open the opengl-series.xcodeproj file in the The code for this article can be found in theįolder. This article builds on the code from the previous article. You can download a zip of all the files from that page, or you can clone the Download all the code as a zip from here:Īll the code in this series of articles is available from github: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |