feat(editor): gradient texture blend for biome transitions

- Gradient Blend: smoothly transitions base texture from one biome
  to another across the entire tile (horizontal or vertical)
- Preset buttons: Grass→Sand and Grass→Snow gradients
- Creates natural biome transition zones without manual painting
- Alpha blending from 0% to 100% across 16 chunks
This commit is contained in:
Kelsi 2026-05-05 08:28:09 -07:00
parent 0907bb5ca2
commit 0a6e54e8a2
3 changed files with 55 additions and 0 deletions

View file

@ -897,6 +897,26 @@ void EditorUI::renderTexturePaintPanel(EditorApp& app) {
selectedTexture_.c_str());
// Auto-paint by height
if (ImGui::CollapsingHeader("Gradient Blend")) {
static int gradDir = 0;
ImGui::RadioButton("Horizontal##grad", &gradDir, 0);
ImGui::SameLine();
ImGui::RadioButton("Vertical##grad", &gradDir, 1);
if (ImGui::Button("Grass → Sand Gradient", ImVec2(-1, 0))) {
app.getTexturePainter().gradientBlend(
"Tileset\\Elwynn\\ElwynnGrassBase.blp",
"Tileset\\Tanaris\\TanarisSandBase01.blp", gradDir == 0);
app.showToast("Gradient applied");
}
if (ImGui::Button("Grass → Snow Gradient", ImVec2(-1, 0))) {
app.getTexturePainter().gradientBlend(
"Tileset\\Elwynn\\ElwynnGrassBase.blp",
"Tileset\\Expansion02\\Dragonblight\\DragonblightFreshSmoothSnowA.blp", gradDir == 0);
app.showToast("Gradient applied");
}
ImGui::TextColored(ImVec4(0.6f,0.6f,0.6f,1), "Smooth texture transition across tile");
}
if (ImGui::CollapsingHeader("Auto-Paint by Slope")) {
static float slopeThresh = 0.4f;
ImGui::SliderFloat("Slope Threshold", &slopeThresh, 0.1f, 0.9f);