Metal blog made with ❤️ by @petertretyakov ✉️ contact@mtldoc.com 🐘 @mtldoc@graphics.social

Joined November 2011
Can’t believe this — PIXEL86, an app I built in 2 days, was used by Swayspace design studio in NYC to design the book cover for Columbia University School of the Arts! So proud 🙏
1
1
45
Graphics Programming weekly - Issue 315 - November 26th, 2023 jendrikillner.com/post/graph…
1
63
2
230
28,246
Debugging affine transforms
This quoted post is unavailable.
2
6
997
If you also found that `.image` ShapeStyle in #SwiftUI `.background` doesn't work in #iOS17 here is the workaround! #xcode #iosdev #bugs
1
3
675
Graphics Programming weekly - Issue 301 - August 20th, 2023 jendrikillner.com/post/graph…
43
167
11,690
Want to read something interesting about new very specific Metal API which can help you in pipeline optimisations? Here is my new article about Metal Stitching Graph! #graphics #GPU #Metal #iosdev mtldoc.com/metal/2023/08/18/…
2
1
4
610
Trying to implement a simple path tracer. Looks like shadowing need some fine tuning and definitely fresnel effect calculation doesn’t work.
1
1
611
Found an interesting behavior in Metal blit encoder. I have a function which gets image file name and makes an MTLTexture from it. All in Rust using metal-rs crate. Which is just bindings to Metal Objective C API. Everything worked fine in tests where I use 512x512 images.
1
117
This is exactly what happened when I tried to use image with size not equal power of 2 in both dimensions. With 128x128, 512x512 textures it works! But with 100x120, 800x600 doesn't. Looks like GPU processing runs in-place in these power of 2 cases.
1
92
Maybe there are some optimisations for these cases when blit processing perfectly aligned to workgroup sizes and in other cases when GPU will need to drop results of some threads outside texture size blit copying will be done with all other processing after command buffer commit.
89
Spent two days trying to implement a simple compute pipeline in Rust using wgpu with the help of GPT-4. I can say that AI is definitely not ready to take my job )) Too much apologies )) But for sure it is a great helper! #Copilot is way more helpful as for me though.
1
2
322
“Designing something without a use case can be fun and educational, but can turn out to be an endless task”. My favorite quote from @m_ou_se book about Rust atomics. Need to repeat it to myself from time to time ))
1
257
wrong number of arguments: expected 3, found 3 WebGPU is so cool!
83
Trying to implement pretty basic keyframe animation system. Never did it by myself but have some understanding after Unity Animation course. This function was created by @github #copilot in milliseconds after I typed `fn va`. I would spend half an hour to make it I think.
1
118
WebGPU API is so much limited comparing to Metal 😭😭😭 The proper example of set algebra. When you need to natively support D3D12, Metal and Vulkan you have to support only the intersection of its features.
1
2
180
Rust + wgpu + wgsl seems to be a great cross-platform solution but unfortunately with a very limited functionality. Need to think about it again. @SebAaltonen have you look at wgpu-native instead of your own wrapper around Metal/Vulkan?
1
2
145