NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
From 0 to glTF with WebGPU: Basic Materials and Textures (willusher.io)
T_MacThrowFace 1 days ago [-]
if that is his actual name, he should promptly grab himself a new web domain in India that will usher in a new world of spectacular 3d graphics
robertlagrant 22 hours ago [-]
I see what you did there.
dusted 1 days ago [-]
It's quite impressive how many more lines of javascript and shading is required to show this in a browser, than it requires to bring a window on the screen and show a texture on it using plain C.
pjmlp 21 hours ago [-]
Tell us that you never used Vulkan, without telling us.
ramon156 17 hours ago [-]
You're saying vulkan isn't using thousands of lines under the hood?
T_MacThrowFace 1 days ago [-]
only if you look past the uncount(ed|able) lines of plain C it would take to make it usable on any device, by everyone with a web browser
shiandow 22 hours ago [-]
Except for the people using firefox (stable), or any mobile device.

With freeglut it's fairly doable to make a version that has wider support than this webpage. Though I definitely prefer this post's syntax to OpenGL.

Not sure if that matters though, given that this is clearly meant as a tutorial for WebGPU, but there's still a ways to go before WebGPU can claim to have broad support.

pjmlp 20 hours ago [-]
Only if using legacy pre-OpenGL Core profile, in terms of lines of code, to come back to original point of this thread.

Additionally, while I tend to bash WebGL and WebGPU lagging behind native counterparts, they are great in one thing, being 3D APIs designed specifically for managed languages.

Also Firefox does WebGL, and if they would have used Threejs or BabylonJS, it would be used instead.

nox101 21 hours ago [-]
Show us ... I think you'll find you're wrong
dusted 14 hours ago [-]
Jasper_ 14 hours ago [-]
Kinda. SDL_renderer is a level on top of the raw GPU API, which is what WebGPU is targeted at. Feel free to use Canvas2DRenderingContext or any other rendering libraries (e.g. Phaser, Pixi.js) to achieve a similar line count to what you're seeing with SDL_renderer.

Also, you might struggle to implement glTF and PBR materials with the same line count with SDL_renderer.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 11:34:12 GMT+0000 (Coordinated Universal Time) with Vercel.