Environment [[Function|Mapping]] is a method in graphics of simulating objects [[Light Reflection|reflecting]] the surrounding environment using an [[Environment Map]]. ![[Pasted image 20251126165145.png|600]] The general assumption for environment mapping are that the reflective object is relatively small compared to its environment. The parameters for environment mapping are the following; - $\vec e$ Eye Location - $\hat{v}$ [[View Frustum|View]] [[Vector]] - $\vec p$ Position - $k$ Reflection Coefficient - $\hat n$ [[Normal Vector]] - $c$ [[Color]] - $u,v$ [[Texture Coordinates]] The general process is to: - Calculate the $\hat{n}, \hat{v}, \hat{r}$ vectors - Map the [[Fragment]] to [[Texture Coordinates|Texture Space]] based on $\hat{r}$ - Obtain sub area in texture space ([[Inverse Texture Mapping]]) - Compute [[Texel]] [[Color]] for the [[Fragment]]