This commit is contained in:
Brian Beck 2025-09-12 12:53:38 -07:00
parent 6b484d1e39
commit 3294e037d9
12 changed files with 12 additions and 8 deletions

0
app/InteriorInstance.tsx Normal file
View file

0
app/Sky.tsx Normal file
View file

0
app/TerrainBlock.tsx Normal file
View file

0
app/WaterBlock.tsx Normal file
View file

View file

@ -132,9 +132,10 @@ export default function HomePage() {
2000
);
function setupColor(tex) {
function setupColor(tex, repeat = [1, 1]) {
tex.wrapS = tex.wrapT = THREE.RepeatWrapping; // Still need this for tiling to work
tex.colorSpace = THREE.SRGBColorSpace;
tex.repeat.set(...repeat);
tex.anisotropy = renderer.capabilities.getMaxAnisotropy?.() ?? 16;
tex.generateMipmaps = true;
tex.minFilter = THREE.LinearMipmapLinearFilter;
@ -535,7 +536,10 @@ uniform float tiling5;
const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshStandardMaterial({
map: setupColor(textureLoader.load(textureToUrl(surfaceTexture))),
map: setupColor(
textureLoader.load(textureToUrl(surfaceTexture)),
[8, 8]
),
// transparent: true,
opacity: 0.8,
});