Skip to content

Commit

Permalink
Examples: Fix onWindowResize (#28706)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Jun 20, 2024
1 parent 7a50693 commit 291f210
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/webgpu_tsl_interoperability.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@

function onWindowResize() {

camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );

}
Expand Down Expand Up @@ -92,7 +90,7 @@
vUv: vec2f,
tex: texture_2d<f32>,
texSampler: sampler,
crtWidth: f32,
crtWidth: f32,
crtHeight: f32,
cellOffset: f32,
cellSize: f32,
Expand All @@ -105,7 +103,7 @@
) -> vec3<f32> {
// Convert uv into map of pixels
var pixel = ( vUv * 0.5 + 0.5 ) * vec2<f32>(
crtWidth,
crtWidth,
crtHeight
);
// Coordinate for each cell in the pixel map
Expand All @@ -130,8 +128,8 @@
let ind = floor( subcoord.x ) % 3;
var maskColor = vec3<f32>(
f32( ind == 0.0 ),
f32( ind == 1.0 ),
f32( ind == 0.0 ),
f32( ind == 1.0 ),
f32( ind == 2.0 )
) * 3.0;
Expand Down

0 comments on commit 291f210

Please sign in to comment.