HN user

tsherif

96 karma

http://tareksherif.net/

Posts18
Comments23
View on HN
tsherif.github.io 3y ago

Space-Shooter.c Ported to WebAssembly/Emscripten

tsherif
2pts0
github.com 5y ago

Simple OpenGL Loader: A cross-platform, (almost) single-file C/C++ OpenGL loader

tsherif
2pts0
tsherif.github.io 6y ago

Tesseract Explorer: Explore a 4-dimensional tesseract in WebGL

tsherif
1pts0
tsherif.github.io 6y ago

Mercator-gl: A tiny library for GLSL web mercator projections

tsherif
1pts0
github.com 6y ago

WebGPU Examples: Small Examples of SPIR-V Compatible WebGPU Usage

tsherif
2pts0
github.com 6y ago

Glcheck: A testing framework for WebGL 1 and 2 applications

tsherif
2pts0
tsherif.wordpress.com 8y ago

WebGL 2 Development with PicoGL.js

tsherif
2pts0
tsherif.github.io 9y ago

WebGL 2 Interactive GPU Cloth Simulation

tsherif
84pts61
tsherif.github.io 9y ago

PicoGL.js: A minimal, WebGL 2-only rendering library

tsherif
2pts0
github.com 9y ago

WebGL 2 Examples: Common rendering algorithms implemented in raw WebGL 2

tsherif
2pts0
tsherif.github.io 10y ago

JavaScript Port of Path Tracer from “Ray Tracing in One Weekend”

tsherif
2pts0
github.com 10y ago

WebGL 2 Samples

tsherif
2pts0
human.biodigital.com 10y ago

WebGL Zombie

tsherif
1pts0
tsherif.wordpress.com 10y ago

Not Ninjas, Just Programmers

tsherif
2pts0
tsherif.wordpress.com 10y ago

From Web to WebGL: A Guide for Web Developers Entering the Third Dimension

tsherif
12pts2
tsherif.wordpress.com 10y ago

From Web to WebGL: A Guide for Web Developers Entering the Third Dimension

tsherif
2pts0
brainbrowser.cbrain.mcgill.ca 12y ago

Show HN: Open Source, WebGL-Based 3D Neurological Data Viewer

tsherif
3pts0
tareksherif.ca 12y ago

Constructors Are Bad For JavaScript

tsherif
1pts0

Thanks! My first child was born last year, and I started a new job 3 months earlier, so time was definitely not an abundant resource! But between the stress of all that and the pandemic, I found squeezing in an hour or two for this project here and there was one of the few things keeping me sane, and that's what got me through it.

Thanks! This was a revelation for me on a few levels:

1. That memory management doesn't have to be scary with a little forethought, at least for programs where you can set a reasonable upper bound on the resource requirements.

2. That it's possible to structure at least a subset of programs in such a way that error states can only be entered during initialization, and that makes the rest of the program much easier to reason about.

i even found out that a call like glBufferSubData will call malloc or related functions. so doing that on each frame seems to be a bad idea as well.

That's interesting and not what I'd expect at all! Is there documentation you could point me to or did you find that out with some tooling? And is there a better way to update attribute buffers for instanced draw calls?

Yeah, I was fiddling with the parameters until I found something I kind of liked. A couple of important factors:

1. Stiffness of the cloth depends on the number of particles vs. the number of iterations you do to resolve the constraints (maybe there's a way to speed this up?). So making things stiffer (at the same grid resolution) does take more time.

2. The faster things are moving, the higher the likelihood that that collisions will be missed. You can already see this if you move the ball very quickly, it can pass through the cloth. With higher gravity, I found the cloth would often get pushed through the ball.

If you want to fiddle around with it, you can clone and tweak the physics parameters here:https://github.com/tsherif/picogl.js/blob/master/examples/cl... and the simulation parameters here: https://github.com/tsherif/picogl.js/blob/master/examples/cl...

It looks like this might be an issue with Apple's AMD driver, since everyone who's having problems seems to be on Mac/AMD setup. I'll look into this when I get my hands on a machine to test on.

Transform feedback is great, but I'm not actually using it for this because I need access to adjacent positions in the grid. I'm using float textures to store the positions and normals.

Three.js is a great library. I used it for BrainBrowser, the neurology project I mentioned in the post. But I disagree with the attitude that because a great library exists to do something, you shouldn't learn how to do that thing yourself. It's like saying that because jQuery exists, web devs shouldn't learn how to manipulate the DOM directly. Part of my reasoning is that I think using these libraries effectively for anything non-trivial requires an understanding of how they work. The other part is that the more people understand how an open-source library works, the more they can contribute and make it better.

Although I disagree with a lot of Google's policies (with respect to privacy, etc.), the claims made by the author here don't make much sense. It's pretty clear that the author and many of the people commenting don't understand how web development for multiple platforms works. Using a new web standard technology (http://www.w3.org/TR/media-source/) that isn't implemented by all browsers and providing a polyfill for non-compliant browsers isn't "crippling" the other browsers. It's considered best practice. If websites only used technologies that are available in all browsers, the web would never move forward.