|
|
@@ -73,7 +73,6 @@
|
|
|
const rendererDOM = document.getElementById( 'renderer' );
|
|
|
|
|
|
const renderer = new THREE.WebGPURenderer( { antialias: true } );
|
|
|
- renderer.outputColorSpace = THREE.LinearSRGBColorSpace;
|
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
|
renderer.setSize( 200, 200 );
|
|
|
rendererDOM.appendChild( renderer.domElement );
|
|
|
@@ -104,7 +103,7 @@
|
|
|
|
|
|
const options = {
|
|
|
shader: 'fragment',
|
|
|
- outputColorSpace: THREE.LinearSRGBColorSpace,
|
|
|
+ outputColorSpace: THREE.SRGBColorSpace,
|
|
|
output: 'WGSL',
|
|
|
preview: true
|
|
|
};
|
|
|
@@ -119,11 +118,9 @@
|
|
|
|
|
|
const { texture, uniform, vec2, vec4, uv, oscSine, time, grayscale } = THREE;
|
|
|
|
|
|
-//const samplerTexture = new THREE.Texture();
|
|
|
const samplerTexture = new THREE.TextureLoader().load( './textures/uv_grid_opengl.jpg' );
|
|
|
samplerTexture.wrapS = THREE.RepeatWrapping;
|
|
|
-//samplerTexture.wrapT = THREE.RepeatWrapping;
|
|
|
-//samplerTexture.colorSpace = THREE.SRGBColorSpace;
|
|
|
+samplerTexture.colorSpace = THREE.SRGBColorSpace;
|
|
|
|
|
|
const scaledTime = time.mul( .5 ); // .5 is speed
|
|
|
const uv0 = uv();
|