@chrisbiscardi@hachyderm.io
@chrisbiscardi@hachyderm.io avatar

chrisbiscardi

@chrisbiscardi@hachyderm.io

Rust and Rust Accessories.

I do youtube: https://www.youtube.com/c/chrisbiscardi

and Rust education: https://rustadventure.dev/

This profile is from a federated server and may be incomplete. Browse more on the original instance.

fasterthanlime, to random
@fasterthanlime@hachyderm.io avatar

Holy fuck, migrating from the rust/cache action to the sccache action made macOS CI times (for a typical PR) fall from 9 minutes to 1 minute

https://github.com/hapsoc/fluke/issues/118

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@fasterthanlime wait is that 9 vs 1 min where both are using the actions caching for storage?

chrisbiscardi, to rust
@chrisbiscardi@hachyderm.io avatar

Today I released a few of the examples I've been working on for visualizing SDFs in #bevyengine and #rustlang in a blog post and video combo.

Its the first usage of interactive examples built with Bevy in this way on the site. I was able to figure out a short-term way to build all of the examples into a single wasm bundle, then configure that execution through an iframe URL. A bit extra work to figure out how to let it get small enough for embeds, but overall success!

https://www.rustadventure.dev/introduction-to-signed-distance-fields

chrisbiscardi, to rust
@chrisbiscardi@hachyderm.io avatar

I don't love this visualization because I think it has drawbacks in providing an intuition that SDFs also provide direction in addition to distance to shape. They do not provide direction, but if you know what shape you're dealing with the math can be done to visualize the point, especially on a circle.

Main benefit of this visualization is seeing the distance be positive outside and negative inside

#rustlang #bevyengine

a ray drawn from the mouse cursor to the edge of an SDF circle that is closest

chrisbiscardi, to rust
@chrisbiscardi@hachyderm.io avatar

interactive visualization using a gizmo and some text display over the top of the SDFs.

drawing a ray out from the origin and matching the uv-adjusted coordinate system. (I'm going with "just the uv adjusted coordinates" for the post rather than world positions.

#rustlang #bevyengine

video/mp4

chrisbiscardi, to random
@chrisbiscardi@hachyderm.io avatar

@dekirisu The gif in https://github.com/dekirisu/strung is really cute! How did you make it?

chrisbiscardi, to javascript
@chrisbiscardi@hachyderm.io avatar

Rust quietly became a cornerstone of modern #javascript tools. Turbopack, Vite, Parcel, Rspack, Tailwind, and more are all choosing to write parts of their JavaScript-focused tools in #rustlang

Here's a video where I dive into why is this happening and how that even works.

https://www.youtube.com/watch?v=dZQMoEWe5uY

surma, to random

I’m kinda fascinated by how Rust was the harbinger of next-gen JS tooling.

Why did it take Rust? There were “fast” languages before, so performance alone isn’t the reason. Is it the modern, cross-platform toolchain that makes it easy to install these new tools for users?

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@surma @davy great timing on this one honestly haha. Just posted it today! Glad you enjoyed it!

chrisbiscardi, to rust
@chrisbiscardi@hachyderm.io avatar

Still working on SDF visualizations in #rustlang and #bevyengine

This is just the positive field visualized

video/mp4

livingcoder, to chrome

When will #mobile #browsers support WebGPU? There was talk about it earlier this year but nothing recently. Anyone know anything?
#chrome #firefox #browser #webgpu

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder Firefox nightly already has it, I was checking yesterday

chrisbiscardi, to rust
@chrisbiscardi@hachyderm.io avatar

Trying to find good ways to visualize different properties of Signed Distance Fields/Functions.

This is visualizing every place the cursor could be, because an SDF only gives you the distance to the closest object.

I don't think this one is terribly useful, but it was fun to make the fragment shader.

#rustlang #bevyengine

video/mp4

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder yeah, I'm actually working on a set of "intro to shaders' topics in the background. I think that's where most people are right now (basically: wanting to get into shaders but not knowing how).

I need to redo an "into to shaders with bevy 0.11" video for sure with all the module import changes and the new prepass shaders.

Is there anything in particular you'd like to see?

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@gak @livingcoder I assume you've seen https://github.com/bevyengine/bevy/blob/edba496697d3918ca5a2110363c502692ef9d2dd/examples/shader/compute_shader_game_of_life.rs but I'll link the example anyway just in case.

Fragment shaders, etc in Bevy really benefit from having the Material abstraction. For compute shaders you have to drop down closer to wgpu-land, which makes knowing how to work with compute shaders in wgpu more helpful. (ex: understanding what a bind group layout is and why you'd need one)

The game of life shader example shows one example of getting output from the compute shader

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder it sounds like you might be interested in bevy_mod_picking -- https://github.com/aevyrie/bevy_mod_picking

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder There's also a PR you might be interested in following the status of that I was looking at yesterday: https://github.com/bevyengine/bevy/pull/8784

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder to be able to add a vertex at the point that was clicked, you would have to know where you clicked. In 2d, you might be able to use the mouse position, but in 3d you have to select into the scene somehow.

Unless I'm misunderstanding what you're trying to achieve. (I'm not entirely convinced you need to add vertices to a mesh to display a hole on screen, but like you said you simplified the example somehow)

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder @gak I will. I'm planning to do some compute shader shenanigans for a global illumination experiment I'm working on. That's what all the raymarching stuff lately has been working towards, I just decided to write everything up at the same time.

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder when you say "hole" is this a 3d scene where you're trying to deform a plane that is on the ground? or is the part you care about the texturing of that area as dirt?

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder Making something look deformed and actually deforming it are definitely two separate concerns. For example you could update a parallax/normal map and easily make something look like it had depth, then color that spot brown and you've got a "hole". (https://bevyengine.org/examples/3D%20Rendering/parallax-mapping/)

If you're actually trying to create a destructable environment, something maybe worms-like, that's a different issue.

You can definitely create meshes manually (https://docs.rs/bevy/0.11.3/bevy/prelude/struct.Mesh.html#manual-creation) and swap them at runtime

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder so if you have the world position of the collision and the mesh than you should be able to update the mesh with additional vertices... but that sounds like a pain to me tbh without having a more structured approach to what deforming the mesh means.

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder yeah always happy to chat. Hard to tell what you're trying to do here given the simplified example. Dropping a ball on the ground doesn't strike me as something that needs deformable vertices, but if you were using that as a euphemism for "terrain paintbrush" you might look into marching cubes or similar.

chrisbiscardi, to bevy
@chrisbiscardi@hachyderm.io avatar

small 2d raymarching experiment in

video/mp4

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar
chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

2d raymarched circles, rectangles, pentagrams, hexagons, octogons.

Gizmos are amazing for debugging and visualizing the raymarching itself.

shapes are rendered via meshes and processed as sdfs

#rustlang #bevyengine

video/mp4

chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar
chrisbiscardi,
@chrisbiscardi@hachyderm.io avatar

@livingcoder gizmos were definitely something I felt the absence of before they were implemented but bevy's implementation of them also surpassed whatever APIs I thought we would get. They're very nice to work with.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines