From 4c92a6c5c34beafe783a6728dae36814d2de8b15 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Fri, 5 May 2023 16:26:33 +0200 Subject: [PATCH] WIP: HexTile3D coloring based on TileWorld Colormap. --- assets/4x4checker.png | Bin 0 -> 561 bytes assets/4x4checker.png.import | 37 ++++ assets/4x4checkerColor.png | Bin 0 -> 585 bytes assets/4x4checkerColor.png.import | 35 +++ .../HexTileCoordinateToTextureColor.gdshader | 62 ++++++ scenes/Game.cs | 21 +- scenes/Game.tscn | 54 ++--- scenes/HexTile3D.cs | 47 ++-- scenes/HexTile3D.tscn | 79 ++++++- scenes/HexTile3DPatch.tscn | 200 +++++++++--------- scenes/NoiseWorldGeneration2D.tscn | 62 +----- scenes/TileWorld.cs | 52 ++++- scenes/TileWorld.tscn | 5 +- 13 files changed, 432 insertions(+), 222 deletions(-) create mode 100644 assets/4x4checker.png create mode 100644 assets/4x4checker.png.import create mode 100644 assets/4x4checkerColor.png create mode 100644 assets/4x4checkerColor.png.import create mode 100644 materials/HexTileCoordinateToTextureColor.gdshader diff --git a/assets/4x4checker.png b/assets/4x4checker.png new file mode 100644 index 0000000000000000000000000000000000000000..fd931309ece4af2e0ad55e45349de9fe82aa306e GIT binary patch literal 561 zcmV-10?z%3P)EX>4Tx04R}tkv&MmKp2MKww9_?9PA+CkfA!YApYT~RVYG*P%E_RU~=gnG-*gu zTpR`0f`dPcRR$fW0qBg8_ngXIopB|{~iB#tVoM*04% z%L?Z$&T6H`TKD8H4Cl3#WvtQcR@jJmKLVa{MB>WO9|k z$gzMbR7j2={11Nj)+|hnyGh{$5PY%ij}aiW3pDGt{e5iP%@ZK-3|wh#f3*S3e3D*o zYtbX1e;c^CZfo)$aJd5vKIxJnIZ}X@zfb_)&*+W{<}&qR00000NkvXXu0mjfA(QS~ literal 0 HcmV?d00001 diff --git a/assets/4x4checker.png.import b/assets/4x4checker.png.import new file mode 100644 index 0000000..6e9265a --- /dev/null +++ b/assets/4x4checker.png.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="StreamTexture" +path.s3tc="res://.import/4x4checker.png-2d12b07d9dea94e0b7f78a32f72bdad7.s3tc.stex" +path.etc2="res://.import/4x4checker.png-2d12b07d9dea94e0b7f78a32f72bdad7.etc2.stex" +metadata={ +"imported_formats": [ "s3tc", "etc2" ], +"vram_texture": true +} + +[deps] + +source_file="res://assets/4x4checker.png" +dest_files=[ "res://.import/4x4checker.png-2d12b07d9dea94e0b7f78a32f72bdad7.s3tc.stex", "res://.import/4x4checker.png-2d12b07d9dea94e0b7f78a32f72bdad7.etc2.stex" ] + +[params] + +compress/mode=2 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=true +flags/filter=true +flags/mipmaps=true +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/4x4checkerColor.png b/assets/4x4checkerColor.png new file mode 100644 index 0000000000000000000000000000000000000000..c67d5abb879fe15dfdee4d0e2f4497942627c26e GIT binary patch literal 585 zcmV-P0=E5$P)EX>4Tx04R}tkv&MmKp2MKww9_?9PA+CkfA!YApYT~RVYG*P%E_RU~=gnG-*gu zTpR`0f`dPcRR$fW0qBg8_ngXIopB|{~iB#tVoM*04% z%L?Z$&T6H`TKD8H4Cl3#WvtQcR@jJmKLVa{MB>WO9|k z$gzMbR7j2={11Nj)+|hnyGh{$5PY%ij}aiW3pDGt{e5iP%@ZK-3|wh#f3*S3e3D*o zYtbX1e;c^CZfo)$aJd5vKIxJnIZ}X@zfb_)&*+("Control/HBoxContainer/GridContainer/mouse_tile_label"); _numCoordsAddedLabel = GetNode