Skip to content

Commit

Permalink
GTAOPass: Remove unused uniform variable and parameter. (#709)
Browse files Browse the repository at this point in the history
* GTAOPass: Remove unused uniform variable and parameter.

* Update three.js

* Add examples

* Update changes.patch

* Delete examples
  • Loading branch information
Methuselah96 authored Dec 15, 2023
1 parent 6dce5c5 commit 9b9e9d1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
37 changes: 16 additions & 21 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ index e296fdc..527b9a7 100644
child.rotation.y += delta * 0.3;
}
diff --git a/examples-testing/examples/webgl2_ubo_arrays.ts b/examples-testing/examples/webgl2_ubo_arrays.ts
index 74d9a62..ca43ef5 100644
index 7f1b3c8..ca43ef5 100644
--- a/examples-testing/examples/webgl2_ubo_arrays.ts
+++ b/examples-testing/examples/webgl2_ubo_arrays.ts
@@ -5,11 +5,15 @@ import Stats from 'three/addons/libs/stats.module.js';
Expand Down Expand Up @@ -2151,15 +2151,6 @@ index 74d9a62..ca43ef5 100644
glslVersion: THREE.GLSL3,
});

@@ -123,7 +127,7 @@ function init() {
// controls

const controls = new OrbitControls(camera, renderer.domElement);
- controls.enabledPan = false;
+ controls.enablePan = false;

// stats

@@ -135,7 +139,7 @@ function init() {
gui.add(api, 'count', 1, pointLightsMax)
.step(1)
Expand Down Expand Up @@ -10947,21 +10938,25 @@ index 47e89f6..4329bfe 100644
renderer.setRenderTarget(null);
renderer.clear();
diff --git a/examples-testing/examples/webgl_postprocessing_gtao.ts b/examples-testing/examples/webgl_postprocessing_gtao.ts
index 6148f63..437f902 100644
index 8993081..67c578c 100644
--- a/examples-testing/examples/webgl_postprocessing_gtao.ts
+++ b/examples-testing/examples/webgl_postprocessing_gtao.ts
@@ -17,9 +17,9 @@ const loader = new GLTFLoader();
loader.setDRACOLoader(dracoLoader);
loader.setPath('models/gltf/');
@@ -10,7 +10,14 @@ import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
import { GTAOPass } from 'three/addons/postprocessing/GTAOPass.js';
import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';

-let mixer;
+let mixer: THREE.AnimationMixer;
-let camera, scene, renderer, composer, controls, clock, stats, mixer;
+let camera: THREE.PerspectiveCamera,
+ scene: THREE.Scene,
+ renderer: THREE.WebGLRenderer,
+ composer: EffectComposer,
+ controls: OrbitControls,
+ clock: THREE.Clock,
+ stats: Stats,
+ mixer: THREE.AnimationMixer;

-const generateLittlestTokyoScene = scene => {
+const generateLittlestTokyoScene = (scene: THREE.Scene) => {
loader.load(
'LittlestTokyo.glb',
gltf => {
init();
animate();
diff --git a/examples-testing/examples/webgl_postprocessing_masking.ts b/examples-testing/examples/webgl_postprocessing_masking.ts
index 3650bfe..88a3d81 100644
--- a/examples-testing/examples/webgl_postprocessing_masking.ts
Expand Down
2 changes: 1 addition & 1 deletion three.js
Submodule three.js updated 63 files
+2 −2 docs/api/en/math/Triangle.html
+1 −0 docs/manual/ar/introduction/Libraries-and-Plugins.html
+1 −0 docs/manual/en/introduction/Libraries-and-Plugins.html
+1 −0 docs/manual/fr/introduction/Libraries-and-Plugins.html
+1 −0 docs/manual/it/introduction/Libraries-and-Plugins.html
+1 −0 docs/manual/ja/introduction/Libraries-and-Plugins.html
+1 −0 docs/manual/pt-br/introduction/Libraries-and-Plugins.html
+1 −0 docs/manual/ru/introduction/Libraries-and-Plugins.html
+1 −1 docs/manual/zh/introduction/Libraries-and-Plugins.html
+4 −4 editor/js/Loader.js
+2 −0 examples/files.json
+53 −53 examples/jsm/loaders/MaterialXLoader.js
+20 −2 examples/jsm/modifiers/CurveModifier.js
+2 −1 examples/jsm/nodes/Nodes.js
+3 −3 examples/jsm/nodes/code/CodeNode.js
+26 −3 examples/jsm/nodes/core/NodeBuilder.js
+2 −0 examples/jsm/nodes/core/VarNode.js
+1 −1 examples/jsm/nodes/functions/PhysicalLightingModel.js
+10 −10 examples/jsm/nodes/materialx/MaterialXNodes.js
+128 −54 examples/jsm/nodes/materialx/lib/mx_hsv.js
+1,430 −618 examples/jsm/nodes/materialx/lib/mx_noise.js
+24 −14 examples/jsm/nodes/materialx/lib/mx_transform_color.js
+2 −0 examples/jsm/nodes/math/MathNode.js
+19 −6 examples/jsm/nodes/math/OperatorNode.js
+25 −2 examples/jsm/nodes/shadernode/ShaderNode.js
+95 −0 examples/jsm/nodes/utils/FunctionOverloadingNode.js
+8 −2 examples/jsm/nodes/utils/SplitNode.js
+4 −6 examples/jsm/postprocessing/GTAOPass.js
+20 −0 examples/jsm/renderers/common/Bindings.js
+6 −0 examples/jsm/renderers/common/Renderer.js
+1 −0 examples/jsm/renderers/common/StorageTexture.js
+30 −0 examples/jsm/renderers/webgl-legacy/nodes/WebGLNodeBuilder.js
+9 −1 examples/jsm/renderers/webgl/WebGLBackend.js
+3 −3 examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js
+36 −0 examples/jsm/renderers/webgl/utils/WebGLCapabilities.js
+11 −1 examples/jsm/renderers/webgl/utils/WebGLExtensions.js
+6 −0 examples/jsm/renderers/webgpu/WebGPUBackend.js
+51 −6 examples/jsm/renderers/webgpu/nodes/WGSLNodeBuilder.js
+1 −1 examples/jsm/renderers/webgpu/utils/WebGPUBindingUtils.js
+42 −45 examples/jsm/shaders/GTAOShader.js
+2 −3 examples/jsm/shaders/SAOShader.js
+2 −3 examples/jsm/shaders/SSAOShader.js
+40 −1 examples/jsm/transpiler/AST.js
+50 −8 examples/jsm/transpiler/GLSLDecoder.js
+4 −4 examples/jsm/transpiler/ShaderToyDecoder.js
+121 −17 examples/jsm/transpiler/TSLEncoder.js
+ examples/screenshots/webgl_postprocessing_gtao.jpg
+ examples/screenshots/webgpu_loader_materialx.jpg
+ examples/screenshots/webgpu_materialx_noise.jpg
+1 −1 examples/webgl2_ubo_arrays.html
+112 −122 examples/webgl_postprocessing_gtao.html
+1 −0 examples/webgpu_compute_texture.html
+192 −0 examples/webgpu_loader_materialx.html
+210 −0 examples/webgpu_materialx_noise.html
+25 −1 src/loaders/ImageBitmapLoader.js
+0 −16 src/math/ColorManagement.js
+17 −5 src/math/Triangle.js
+0 −14 src/renderers/WebGLRenderer.js
+27 −0 src/renderers/webgl/WebGLShadowMap.js
+5 −9 src/renderers/webgl/WebGLTextures.js
+6 −0 test/e2e/puppeteer.js
+0 −18 test/unit/src/math/ColorManagement.tests.js
+3 −7 test/unit/src/math/Triangle.tests.js
1 change: 0 additions & 1 deletion types/three/examples/jsm/postprocessing/GTAOPass.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class GTAOPass extends Pass {
radius?: number | undefined;
distanceExponent?: number | undefined;
thickness?: number | undefined;
bias?: number | undefined;
scale?: number | undefined;
samples?: number | undefined;
screenSpaceRadius?: boolean | undefined;
Expand Down
1 change: 0 additions & 1 deletion types/three/examples/jsm/shaders/GTAOShader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const GTAOShader: {
cameraProjectionMatrixInverse: IUniform<Matrix4>;
radius: IUniform<number>;
distanceExponent: IUniform<number>;
bias: IUniform<number>;
scale: IUniform<number>;
sceneBoxMin: IUniform<Vector3>;
sceneBoxMax: IUniform<Vector3>;
Expand Down

0 comments on commit 9b9e9d1

Please sign in to comment.