GLSL: Difference between revisions

No edit summary
Line 12: Line 12:
===Fragment Shader===
===Fragment Shader===
In the fragment shader, you will typically sample a base color and apply lighting to your object.
In the fragment shader, you will typically sample a base color and apply lighting to your object.
Sampling is typically done with <code>texture2D</code> which returns an interpolated and mipmaped color from your <code>sampler2D<code> texture.
Sampling is typically done with <code>texture2D</code> which returns an interpolated and mipmaped color from your <code>sampler2D</code> texture.


==Pipeline==
==Pipeline==