I polished the dll part a few days ago, but as for actually binary patching it's up to @meetem.bsky.social . It's a bit tricky to do for all platforms and Unity versions.
@guycalledfrank
Graphics programmer, indie game developer. Developed Bakery (a GPU lightmapper) and some other tools. Ex-PlayCanvas engine dev. Working on Faded: https://linktr.ee/fadedthegame Other stuff: https://ndotl.wordpress.com/cv/
I polished the dll part a few days ago, but as for actually binary patching it's up to @meetem.bsky.social . It's a bit tricky to do for all platforms and Unity versions.
Thank you, and I like what you baked! π
So yes, the C# code on both top/bottom videos is actually identical. If we had Unity source, it would be a ~10-line change + you need to make UI for the user to add actual colliders to the wheels. But since we don't have it, we do it in arcane ways.
...aand somehow it actually WORKED π€ͺ
Even if you don't have Unity source code, you still have the asm and the pdb, so it's ALMOST like having source code π
And I wrote a DLL that exposes a function with a similar signature, but instead, adds actual wheel shapes to the car and calls PxVehicleSuspensionSweeps. I also had to convert data between raycast/sweep queries.
But it's not going to stop us... us being me and
@meetem.bsky.social who wondered if we can just hack it into Unity. And we tried.
Thanks to Unity.pdb, Meetem managed to find where it calls PxVehicleSuspensionRaycasts and replace it with a jump to custom mem where he forwarded it to a DLL
...but not in Unity. As it turns out, PhysX supported non-ray wheels for about 10 years. It's mentioned in 2017 on Unity forum... discussions.unity.com/t/physx-v3-4...
Yet Unity never exposed this abiltiy (even though they kept updating PhysX version).
Do you also dislike how Unity's WheelCollider only casts 1 center ray, so cars jump on every tiny bump?
Did you also see 3rd-party assets doing like 16 rays per wheel and thought maybe it's kinda expensive?
Did you know that PhysX can actually sweep convex shapes instead of rays?
#gamedev
Introducing FragCoord: My ultimate shader editing tool!
Unity, but as long as you can access world (aka model) matrix and view-projection matrix, you should be able to use the same code
I've been working with Spherical Gaussians recently as a representation for irradiance in realtime raytracing.
Ended up deriving quite a few new approximations relating to SGs and diffuse lighting. Ended up with something both cheap and accurate. Check it out:
www.shadertoy.com/view/WX3fRB
You can try it yourself fairly quickly. but with w=1 the "light" will be fixed in screen space, unconnected from object's distance; with non-squared w it will appear to shrink with distance, but with a different speed from the object itself. Single pow is just too harsh like a basic phong highlight
It's probably because pow doesn't scale the dot linearly, so I need to square the power... but often I just do the first intuitive thing looking at the image and how it responds.
Do you mean with one dot or without w-squaring?... or just more different lamps? π
...and TBH I'm still not entirely sure why squaring makes it work mathematically.
Apart from that the code is pretty simple. Dot gives you a blob, centered around object's pivot; sum of two pows gives a longer tail (GGX-ish, can probably do the same without pows).
Light has stable world-space size done via this w*w dark magic. I remembered Humus' "phone-wire AA" using w for stable wire thickness, tried it here and it almost worked, but was still off... I squared it because it looked like it needs squaring, and it worked!
Improvised a little lampshade shader that imitates scattered light from inside. Code and details in the comments! :)
#gamedev
Hmmm I only read whom I follow and I guess I don't follow annoying people, because my experience here and there is pretty similar...
New post on how to do real-time diffuse global illumination using surfels and #WebGPU: juretriglav.si/surfel-based... #threejs
The people of Ukraine continue to endure ongoing Russian aggression.
From February 2 to 9, weβll donate 100% of the proceeds from our games and DLC on all platforms to People In Need in support of humanitarian aid in Ukraine.
Marcin Zalewski informed me that his blog post on real-time hair rendering using ray tracing is now available:
mmzala.github.io/blog/hair-ge...
This is nice work, in which he compares NVidia's hardware accelerated hair to several alternatives, including Reshetov's Phantom Ray Hair Intersector.
Thereβs also so called AoSoA layout which has benefits of the both (and some GPUs support that 10+ years but APIs never exposed). An example of AoSoA use on CPU also shows pretty solid perf (e.g. : github.com/pm4rtx/Unity...)
Slapped together a dialogue editor for my game in ~3 days, based on imgui-node-editor from thedmd (github.com/thedmd/imgui...). They were previously all just hardcoded inside NPC behaviours and it was a mess to read (+ nobody else could write them), so hopefully it was worth it!
Lovely results!
Aand the new Bakery patch is now available on the Asset Store! (and it's still 50% off)
assetstore.unity.com/packages/too...
#gamedev
If you had an issue on a 50xx GPU after that patch, please try patching again - I've just updated it.
Many thanks to @imlexz.bsky.social for testing!
The black friday sale is over, but now there's a new one! Because Christmas is near or something? I guess!
#gamedev
(And if you're on a >= 590 driver, please try the github patch! It's almost ready for the Store release)
My "No Graphics API" blog post is live! Please repost :)
www.sebastianaaltonen.com/blog/no-grap...
I spend 1.5 years doing this. Full rewrite last summer and another partial rewrite last month. As Hemingway said: "First draft of everything is always shit".
New Bakery version uses OptiX9 library instead 6.
OptiX9 API is massively different to OptiX6. The "fix" was comparable to porting a DX9 game engine to DX12 π
But on the other hand, it's now much more efficient and in retrospect I see why NV wanted to deprecate 6...
Bakery has been updated to support the new drivers!
Please try updating via github/patcher. If no issues are reported within the next week, I'll update the Asset Store version.
The new version should also bake faster (!)