rokojori_action_library/Runtime/Procedural/ControlMaps/ControlMapDebugPattern.cs

54 lines
1.9 KiB
C#

using Godot;
using System;
using Rokojori.Extensions;
namespace Rokojori
{
/** What ControlMapTerrain fills a fresh control map with.
There is no painting system yet, so the map needs a source in order for
there to be anything to look at. These are deliberately patterns rather
than content: each one isolates a single thing that can be wrong, so a
live test says which part broke instead of only that something did.
*/
public enum ControlMapDebugPattern
{
/** Texture 0 everywhere, neutral in every field. What a painting system
would start from, and the control that proves nothing in the decode path
is adding anything of its own.
*/
Flat = 0,
/** Texture index cycling per cell, no blending. Hard index boundaries -
this is what shows whether the 4-tap read is sampling the texels it
thinks it is, since a half-texel error puts the seams visibly off the
cell grid.
*/
Checkerboard = 1,
/** Texture 0 under texture 1, blend ramping along X. Isolates the
base/overlay crossfade and the height weighting; blendSharpness should
visibly change the shape of the transition and nothing else.
*/
BlendGradient = 2,
/** Per-cell uv scale and rotation, one texture. Isolates the two fields
that are nothing but uv manipulation - and therefore the derivative
handling, because this is the pattern that goes blurry at every cell
border if textureGrad is not doing its job.
*/
ScaleAndRotation = 3,
/** Holes punched in a grid, texture 0 elsewhere. Isolates the flag path,
which is read from a single texel and so should have perfectly square
edges even with bilinear on.
*/
Holes = 4,
/** All four of the above in quadrants, so one look covers everything. The
one to start a live test with.
*/
Showcase = 5
}
}