]> Dogcows Code - chaz/rasterize/blobdiff - config.h
add phong interpolation (lighting)
[chaz/rasterize] / config.h
index 9637deae9233ea9d0e21a67dcc53ca4cfc786c99..a1d7fb9636dfb899bfcd0b90e5cf45f5a0e75ae3 100644 (file)
--- a/config.h
+++ b/config.h
 #define IF_DEPTH_TEST(X)
 #endif
 
+/*
+ * DOUBLE_FLOAT
+ * If enabled, scalars will be of type double.  This provides and insane level
+ * of precision at a performance cost.  The default behavior just uses floats.
+ */
+#if DOUBLE_FLOAT
+#define IF_DOUBLE_FLOAT(X) X
+#else
+#define IF_DOUBLE_FLOAT(X)
+#endif
+
 /*
  * EXPORT_BMP
  * If enabled, each scene rasterization will be saved as a BMP image file.
  * LIGHTING
  * If enabled, local lighting will be used to increase realism of the scene.
  * This option has a performance cost, but it can produce interesting visuals.
- * The behavior of this option also depends on the SMOOTH_COLOR option and
- * whether or not the model has unique vertex normals; if SMOOTH_COLOR is
- * disabled, each triangle will be shaded a flat color.  If it is enabled,
- * Gouraud interpolation is used to smooth the lighting across the face of
- * each triangle.  See the PRE_NORMALS and SMOOTH_COLOR options.
+ * The behavior of this option is effected by its precise value:
+ *   1 Phong lighting model with flat (per-face) interpolation.
+ *   2 Phong lighting model with Gouraud (per-vertex) interpolation.
+ *   3 Phong lighting model with Phong (per-pixel) interpolation.
  */
 #if LIGHTING
 #define IF_LIGHTING(X) X
This page took 0.021045 seconds and 4 git commands to generate.