296 karma · joined Sep 3, 2020 (6y ago) · 111 submissions
comment 2y ago · link · parent
I'm certain you could turn this knowledge into a blog post and help many more engineers who are silently struggling through this path. Self-studying graphics programming is tough!
It should pop up first on YouTube if you search "What is WebGPU Suboptimal Engineer", but I'll link it here[0] in case anyone else wants to watch it. (No need for you to actually fact-check it. I didn't mean to put random work on your plate on a Sunday haha.)
comment 2y ago · link · parent
The funny thing is that I was getting more confident about using JS + WebGL/WebGPU ecosystem for graphics programming after having read your posts. Very interesting to hear that you've come full circle back to Cpp + WebGL/WebGPU + WebAssembly. I'll look more closely to assess options as I head down this journey. Thank you for your tips and advice!
Edit: Perhaps you'd find my "What is WebGPU" video on YouTube interesting. I'd love to get it fact-checked by someone who's been doing WebGl/WebGPU way longer than most people! I only got into this field ~2 years ago.
comment 2y ago · link · parent
The most important reason for my code structure is that I just like writing GLSL shaders! It's annoying that I need to set up Vite, TypeScript, Tailwind, React, etc. all so that I can write some shaders. I know I can write shaders in ShaderToy, but then I won't be able to upload custom 3D texture files or add simple user controls.
comment 2y ago · link · parent
Have you looked into Slicer3D[0] which is a multi-platform desktop app or Open Health Image Foundations dicom viewer[1] which is web-based? Perhaps one of these will help.
comment 2y ago · link · parent
Oh wow, your project looks really cool too! I'll check it out.
Interesting. I did not know that CDs did not need to get HIPAA compliance. I suppose web apps would certainly need that. I wonder what will happen once Gen Alpha starts needing to get MRI scans.
comment 2y ago · link · parent
It just really irked me that people got CDs instead of being fully digital. The last time I used a CD (besides my PS4) was 10+ years ago. I don't even have a CD player anymore. I'm sure Gen Alpha will look at CDs the way I look at floppy disks.
comment 2y ago · link · parent
Here are some questions that came up:
- Do I use Next.js or Vite.js or CRA (is that still used these days)
- With Vite.js do I pick React or go with TypeScript template?
- Okay now I need Tailwind (because quite honestly, I'm terrible at CSS which I admit is my own doing)- But what if I don't want to write GLSL files in raw text, and use GLSL file extension?
- Oh now you want to import GLSL files directly, well you can't do that
- Oh, I needed to install a Vite plugin but then TS throws errors saying it can't read files that end with .glsl
- Wait is my TS server running? No, I thought this always starts up in VS Code
- Okay so I can't even find the button to restart TS server, so now I need to... okay figured that out
- That still didn't fix it the TS errors
- After some more research, ah so you can import text files like this a.glsl?raw extension40.
Show HN: Volume rendering 3D data in Three.js and GLSL(github.com ↗)
108 points · by SuboptimalEng · 2y ago · 37 comments
41.
The tech industry favors specialized engineers over generalists(old.reddit.com ↗)
1 points · by SuboptimalEng · 2y ago · 1 comment
43.
Ask HN: Is it better to specialize in economic downturns?
4 points · by SuboptimalEng · 2y ago · 4 comments
comment 3y ago · link · parent
uniform float time;
varying vec2 vUv;
varying vec3 vNormal;
vec2 rot(vec2 uv, float angle) {
float c = cos(angle);
float s = sin(angle);
mat2 rot = mat2(s, -c, c, s);
return uv * rot;
}
void main(){
vec3 black = vec3(0.0);
vec3 white = vec3(1.0);
vec3 color = black;
vec2 uv = vUv;
uv = rot(uv, sin(time) * 0.05);
float boardSize = 24.0;
uv = uv * boardSize;
vec2 gridId = floor(uv);
if (mod(gridId.x + gridId.y, 2.0) <= 0.01) {
color = white;
} else {
color = black;
}
gl_FragColor = vec4(color, 1.0);
}comment 3y ago · link · parent
Shameless self promotion, I’ve made 10+ tutorials going over topics like: how to write shaders in VS Code, SDFs, ray marching, noise functions, fractional brownian motion, etc.
https://github.com/suboptimaleng/shader-tutorials
I’m certainly standing on the shoulders of giants like Inigo Quilez, The Art of Code, SimonDev and Acerola.
comment 3y ago · link · parent
IIRC, George Hotz studied at CMU for a semester, took 4 difficult classes, got a 4.0, and won a CTF competition before dropping out.
My take is that the normal programmer (frontend, backend, systems, etc.) would benefit greatly from a CS degree.
comment 3y ago · link · parent
That was my biggest pain-point with using TS for graphics related projects. If operator overloading existed, then TS would be a no brainer for entry level graphics + AI/ML projects.
Edit: This gets more complicated when doing operations that force you to manually respect PEMDAS. For example, `add(div(a, b), multiply(c, d))` in TypeScript would simplify to `a / b + c * d` in Python. The TS version is unreadable.
49.
Ask HN: Have you ever pivoted your career?
4 points · by SuboptimalEng · 3y ago · 2 comments
comment 3y ago · link · parent
Turns out this was a super fast way to grow, but I decided to change directions as I didn't want to become an interview prep channel. Unlisted most of my videos and started fresh in early 2021. (You can still find them on a playlist on my channel.)
From then I made videos focusing on tech I was interested in like Vue.js, Tailwind CSS, React, TypeScript, VS Code, and Vim! Late 2021, I stumbled upon Three.js and graphics programming and that's the main focus of my channel now. My latest video was a tutorial on the Phong lighting method.
Stats: 14k+ subscribers, 1M+ total views, $100-200 per month (passive) income.
comment 4y ago · link · parent
Most big creators have (some form of) courses on other platforms as they are a great source of income. For example, Ali Abdaal (back when he had 1M subs) made 40K - 60K[0] per month by making courses on SkillShare. Convincing your audience to buy a course on another platform may be a viable for big creators, but it is much harder for small creators like myself. Having courses directly on YouTube is the best alternative.
I've always wanted this feature, but never knew how to bring it up to anyone working at YouTube! If any one from YouTube is reading this feel free to reach out - I've got lots of ideas on this!
comment 4y ago · link · parent
I was a 12 season runner in high school (averaged 30-60 miles per week), but I still had 6-8 hours of free time once I got home from school every night.
Now imagine this same high school scenario in 2020 vs 1990. In 1990, no social media, no games, no decent phone (for texting), and no computer (for most people in the world). The only fun thing to do was to literally pick up a book and read it.
comment 4y ago · link · parent
No games, no good tv/phones, and no social media.
And my theory was (essentially) confirmed when John Carmack tweeted[0] about how he avoids distractions in the present day. So it's safe to assume he would've struggled with distractions just like we did growing up (if said distractions existed at that time).
Point being, don't stress too much. We grew up in a different time. At a young age, we just didn't know any better. At least now you are more aware and can make better decisions.
55.
Ten Lessons from “Senior” Software Engineering(happycoding.io ↗)
9 points · by SuboptimalEng · 4y ago · discuss