{
  "name": "@exercise/texture-parameters",
  "version": "1.0.0",
  "main": "server.js",
  "dependencies": {},
  "scripts": {
    "start": "node server.js"
  },
  "readme": "# Exercise\n\nFor this exercise you should configure a texture so that:\n\n* Minification and magnification use linear filtering\n* The s-axis repeats\n* The t-axis is mirrored\n\n# More on Parameters\n\nAs we just saw, textures are basically 2D grids of pixels with well defined colors at each grid point.  However, in GLSL it is possible to:\n\n* Sample textures at values in between different grid points\n* Sample textures outside of the bounds of the normal grid\n\nIn these cases, we need to tell WebGL what to do so that it can figure out how to handle these cases consistently.  This is done using the `gl.texParameteri` command which has the following interface:\n\n## `gl.texParameteri(gl.TEXTURE_2D, parameter, value)`\nWhere:\n\n* `parameter` is the name of the parameter to set\n* `value` is the value to set the parameter to\n\n# Filtering\n\nThe first of these issues (or how to handle values between grid points) is handled using filtering.  WebGL makes a distinction between filtering when zooming into a texture and when zooming out.  These are handled by the magnification and minification filtering modes respectively and specified using the following parameters:\n\n* `gl.TEXTURE_MAG_FILTER` - magnification filter mode\n* `gl.TEXTURE_MIN_FILTER` - minification filter mode\n\nThese parameters can be set to the following values:\n\n* `gl.NEAREST` rounds the sample coordinate to closest grid point in the texture\n* `gl.LINEAR` interpolates the texture value using bilinear interpolation\n\nThere are also some extra filtering modes for minification related to mipmapping, but we will come back to them later.  (Don't worry about them for now.)\n\n# Wrapping\n\nThe other issue is how textures are handled when accessed outside of bounds.  In WebGL, there are three ways to handle this situation:\n\n* `gl.CLAMP_TO_EDGE` the coordinate is clamped to the boundary\n* `gl.REPEAT` the coordinate wraps around cyclically\n* `gl.MIRRORED_REPEAT` the coordinate is reflected along the boundary\n\nAnd these behaviors can be applied independently to either axis of the texture:\n\n* `gl.TEXTURE_WRAP_S`\n* `gl.TEXTURE_WRAP_T`\n",
  "readmeFilename": "README.md",
  "description": "For this exercise you should configure a texture so that:",
  "_id": "@exercise/texture-parameters@1.0.0",
  "_shasum": "fc179ba24a2aea34b57482ea3f8421260172adbb",
  "_from": "exercises/texture-parameters",
  "_resolved": "file:exercises/texture-parameters"
}
