From 70eaad4a88962a8cfcc61e89540aefcca9196f28 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Wed, 1 Apr 2015 16:46:00 -0700 Subject: [PATCH] improve config macro documentation clarify which config macros are required and which are optional --- stb_voxel_render.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/stb_voxel_render.h b/stb_voxel_render.h index 61680b7..ee97069 100644 --- a/stb_voxel_render.h +++ b/stb_voxel_render.h @@ -196,7 +196,7 @@ extern "C" { // // CONFIGURATION MACROS // -// #define STBVOX_CONFIG_MODE +// #define STBVOX_CONFIG_MODE // REQUIRED // Configures the overall behavior of stb_voxel_render. This // can affect the shaders, the uniform info, and other things. // (If you need more than one mode in the same app, you can @@ -210,15 +210,14 @@ extern "C" { // 21 Untextured blocks, 20-byte quads // // -// #define STBVOX_CONFIG_PRECISION_Z +// #define STBVOX_CONFIG_PRECISION_Z // OPTIONAL // Defines the number of bits of fractional position for Z. -// Only 0 or 1 are valid. If 0, then a single mesh has -// twice the legal Z range; e.g. in modes 0,1,20,21, -// Z in the mesh can extend to 511 instead of 255. -// However, half-height blocks cannot be used. +// Only 0 or 1 are valid. 1 is the default. If 0, then a +// single mesh has twice the legal Z range; e.g. in +// modes 0,1,20,21, Z in the mesh can extend to 511 instead +// of 255. However, half-height blocks cannot be used. // -// -// All of the following just #ifdef tested so need no values. +// All of the following just #ifdef tested so need no values, and are optional. // // STBVOX_CONFIG_BLOCKTYPE_SHORT // use unsigned 16-bit values for 'blocktype' in the input instead of 8-bit values @@ -241,11 +240,11 @@ extern "C" { // Declares a lighting function hook; you must append a lighting function // to the shader before compiling it: // vec3 compute_lighting(vec3 pos, vec3 norm, vec3 albedo, vec3 ambient); -// 'ambient' is the half-lambert ambient light with vertex ao applied +// 'ambient' is the half-lambert ambient light with vertex ambient-occlusion applied // // STBVOX_CONFIG_FOG_SMOOTHSTEP // Defines a simple unrealistic fog system designed to maximize -// unobscured view distance while not looking to weird when things +// unobscured view distance while not looking too weird when things // emerge from the fog. Configured using an extra array element // in the STBVOX_UNIFORM_ambient uniform. //