Thesis: Retain final render pixel color control within palette textures, separating definition of colors from color placement. Enable non-photoreal color ramps on a per-material basis. Enable texture re-use with swapped palettes. Enable fast color modification for artists and players.Enable glowing elements within the palette itself. Minimize texture memory by storing some albedos as greyscale with small (64x64) color tables. Environment Material Shader (defaultwall) Use case: Conform full-color albedo textures to a continuous 2D palette using albedo Value and light Value to determine lookup coordinates.Best used with albedos created with traditional methods. Inputs:Albedo (single layer bitmap or multilayer dds)Light (lightmap, dynamic)Palette textureAdjustment params for fresnel, albedo mix factor, and light scale. Limitations:Textures with large contrasts in color areas require mixing back in some of the original albedo, or a multilayer dds, since the palette files for these tend to be fairly continuous. Stages:1: Sample lighting on standard texture coordinates, first converting to linear grayscale for a 0-1 value.2: Sample albedo on standard texture coordinates, performing the same conversion.3: Offset stage 1 value according to fresnel multiplied by stage 2.3: Sample palette using stage 1 for the x texture coordinate, and stage 2 for the y.4: Mix in colored lighting, original albedo, etc. Character Material Shader Use case: Use a more rigidly defined palette to define color islands on a model with grayscale lookups, and then offset with an additional overlay texture. Inputs:Greyscale albedoLight (lightmap, dynamic)Palette textureGreyscale overlay textureHalftone dot textureAdjustment params for fresnel, undershading, and halftone dot size. Limitations:The albedo lookups are more sensitive to raster inaccuracy, and thus does not support antialiasing on that layer. The overlay texture can be used to antialias edges to some extent. Stages:1 Sample lighting on standard texture coordinates, converting to linear grey scale for a 0-1 value. Convert values according to a half lambert curve.2 Sample albedo, which will already be a greyscale texture since coordinate lookups are more discrete. 3 Offset stage 1 value according to the overlay texture (on standard texture coordinates) using a modified overlay function. This function properly scales the underlying value with multiplication under values of 0.5 and addition with values over 0.54 apply dot shading, undertone, and fresnel effects.