Damien Seguin

Results 165 comments of Damien Seguin

Current workaround: ```js function cleanUpGeometryBuffers(ctx, geometry) { if (geometry._indices.buffer) ctx.dispose(geometry._indices.buffer) Object.values(geometry._attributes).forEach((attribute) => { if (attribute.buffer) ctx.dispose(attribute.buffer) }); } ```

Could that be abstracted in a view system then?

As long as the `material.vert.js` or an overriding custom shader declare and set `vNormalWorld`, this shouldn't happen (default behaviour is `vNormalWorld = normalize(vec3(uInverseViewMatrix * vec4(vNormalView, 0.0)));`)

`getPexMaterialTexture` is called for every material texture (in handleMaterial) but texture2D creation is cached in _tex so no problem of loading textures twice: https://github.com/pex-gl/pex-renderer/blob/bc51a9f385b841ebb46916d4dd4848778898e41a/loaders/glTF.js#L242 > ctx.texture2D is called 39 times...

Would checking `&& (Number.isFinite(cmd.instances) && cmd.instances > 1)` be too much automagic?

So new components will look like that: ```js // basic const material = { baseColorTexture: texture }; // or with transform const material = { baseColorTexture: { texture, transform: textureTransform...

At the moment, materials `texture.texCoordTransformMatrix` is not set directly. Instead, the more user friendly texture.offset/rotation/scale is used and the matrix only computed on set(). So you can either provide: -...

> > Instead, the more user friendly texture.offset/rotation/scale is used > > Is it? :D I thought all we have is texCoordTransformMatrix Yep, here we compute the matrix: https://github.com/pex-gl/pex-renderer/blob/5cced079d6b6330cf42656c57200d2c49e517806/material.js#L122-L134 >...

> don't scale scenes -> fix your asset! current attitude after posting this issue Unfortunately gltf sample models are all over the place in term of scaling. Sounds like a...

- It comes with nodes so why not - Yes! - Less dependencies