const backgroundTexture = new THREE.TextureLoader().load("obrazky/space.jpg")
const _VS = `
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}`;
const _FS = `
uniform sampler2D globeTexture;
varying vec2 vUv;
void main() {
gl_FragColor = texture2D(globeTexture, vUv);
}`;
const scene = new THREE.Scene();
scene.background = backgroundTexture;
const geometry = new THREE.SphereGeometry(5, 50, 50)
const material = new THREE.ShaderMaterial({
uniform: {
globeTexture: { value: new THREE.TextureLoader().load('obrazky/light-gray-concrete-wall.jpg') }
},
vertexShader: _VS,
fragmentShader: _FS
});
const sphere = new THREE.Mesh(geometry, material);
scene.add(sphere);
here screenshot