diff --git a/packages/frontend-misskey-world-engine/src/envs/lobby.ts b/packages/frontend-misskey-world-engine/src/envs/lobby.ts index 104547cb18..d6cc6f80be 100644 --- a/packages/frontend-misskey-world-engine/src/envs/lobby.ts +++ b/packages/frontend-misskey-world-engine/src/envs/lobby.ts @@ -37,6 +37,7 @@ export class LobbyEnvManager extends WorldEnvManager { this.skyboxMat.disableLighting = true; this.skybox.material = this.skyboxMat; this.skybox.infiniteDistance = true; + this.engine.gl!.addExcludedMesh(this.skybox); const ambientLight1 = new BABYLON.HemisphericLight('ambientLight1', new BABYLON.Vector3(0, 1, 0), this.engine.scene); ambientLight1.diffuse = new BABYLON.Color3(1.0, 0.9, 0.8); @@ -372,16 +373,17 @@ export class LobbyEnvManager extends WorldEnvManager { this.engine.sr.updateMesh([worldRingH, ...worldRingH.getChildMeshes(), worldRingM, ...worldRingM.getChildMeshes()], false); }, 100); - const sphere = this.meshes.find(m => m.name.includes('__DOME__')); - const texture = new BABYLON.CustomProceduralTexture('texture', '/client-assets/world/envs/lobby/shaders/bg', 4096, this.engine.scene); - texture.hasAlpha = true; - texture.wrapU = BABYLON.Texture.MIRROR_ADDRESSMODE; - texture.wrapV = BABYLON.Texture.MIRROR_ADDRESSMODE; - sphere.material = new BABYLON.StandardMaterial('sphereMat', this.engine.scene); - (sphere.material as BABYLON.StandardMaterial).diffuseTexture = texture; - (sphere.material as BABYLON.StandardMaterial).emissiveColor = new BABYLON.Color3(1, 1, 1); - (sphere.material as BABYLON.StandardMaterial).disableLighting = true; - (sphere.material as BABYLON.StandardMaterial).useAlphaFromDiffuseTexture = true; + const dome = this.meshes.find(m => m.name.includes('__DOME__')); + const domeTexture = new BABYLON.CustomProceduralTexture('texture', '/client-assets/world/envs/lobby/shaders/bg', 4096, this.engine.scene); + domeTexture.hasAlpha = true; + domeTexture.wrapU = BABYLON.Texture.MIRROR_ADDRESSMODE; + domeTexture.wrapV = BABYLON.Texture.MIRROR_ADDRESSMODE; + dome.material = new BABYLON.StandardMaterial('sphereMat', this.engine.scene); + (dome.material as BABYLON.StandardMaterial).diffuseTexture = domeTexture; + (dome.material as BABYLON.StandardMaterial).emissiveColor = new BABYLON.Color3(1, 1, 1); + (dome.material as BABYLON.StandardMaterial).disableLighting = true; + (dome.material as BABYLON.StandardMaterial).useAlphaFromDiffuseTexture = true; + //this.engine.gl!.addExcludedMesh(dome); const screenMeshes = this.meshes.filter(m => m.name.includes('__SCREEN__')); const screenMaterial = screenMeshes[0].material as BABYLON.PBRMaterial; diff --git a/packages/frontend/assets/world/envs/lobby/lobby.blend b/packages/frontend/assets/world/envs/lobby/lobby.blend index a55b5cdb90..d6137e5b12 100644 Binary files a/packages/frontend/assets/world/envs/lobby/lobby.blend and b/packages/frontend/assets/world/envs/lobby/lobby.blend differ diff --git a/packages/frontend/assets/world/envs/lobby/lobby.glb b/packages/frontend/assets/world/envs/lobby/lobby.glb index a2feb1de05..7838409ff0 100644 Binary files a/packages/frontend/assets/world/envs/lobby/lobby.glb and b/packages/frontend/assets/world/envs/lobby/lobby.glb differ diff --git a/packages/frontend/assets/world/envs/lobby/shaders/bg/custom.fragment.fx b/packages/frontend/assets/world/envs/lobby/shaders/bg/custom.fragment.fx index 200eb28932..556d7adb45 100644 --- a/packages/frontend/assets/world/envs/lobby/shaders/bg/custom.fragment.fx +++ b/packages/frontend/assets/world/envs/lobby/shaders/bg/custom.fragment.fx @@ -78,15 +78,22 @@ uniform float time; void main(void) { vec2 uv = gl_FragCoord.xy / vec2(4096.0, 4096.0); - float noise = snoise(vec3(uv.x * 3.0, uv.y * 3.0, time * 0.05)); - float radius = 0.001; - float spacing = 0.01; + float noise = snoise(vec3((uv.x * 3.0) + (time * 0.05), uv.y * 3.0, time * 0.01)); + noise = max(0.0, noise - 0.5) * 2.0; + noise = min(1.0, noise * 1.5); + float radius = 0.0015; + float spacing = 0.02; float x = mod(uv.x, spacing); float y = mod(uv.y, spacing); float dist = sqrt((x - spacing / 2.0) * (x - spacing / 2.0) + (y - spacing / 2.0) * (y - spacing / 2.0)); if (dist < radius) { - gl_FragColor = vec4(1.0, 1.0, 1.0, max(0.0, noise - 0.5) * 2.0); + gl_FragColor = vec4(1.0, 1.0, 1.0, noise); } else { - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0); } + + //gl_FragColor = vec4(noise, noise, noise, 1.0); + + //vec2 uv = gl_FragCoord.xy / vec2(4096.0, 4096.0); + //gl_FragColor = vec4(uv.x, uv.y, 0.0, 1.0); }