Mirza Beig Profile picture
May 4 3 tweets 2 min read Twitter logo Read on Twitter
Slicing ANY mesh (visual) with 2 lines of HLSL.

if (dot(worldPos - planePos, planeNorm)) > 0.0
discard (the pixel, or clip alpha) ⭕🌠

Mesh back faces can be stencil masked with the plane to 'project' a texture as the clipped surface.

#unitytips #unity3d #gamedev #indiedev
Here's the shader graph version (ASE). ✨
Just one line if you inline the discard/clip. 😁 Image
This part is important for the texture projection (actually stencil masking). ImageImage

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Mirza Beig

Mirza Beig Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @TheMirzaBeig

Mar 21
#UnityTips: 🔥 Fluid 'simulation' trail shader. 🫧

Inspired by a #b3d node animation. [U]V gradient masks control the colour/alpha/width over trail. ✨

('fluid' is 100% rendered in the shader)

#unity3d #gamedev #indiedev #madewithunity #gameart #vfx #realtimevfx #proceduralart
In glorious, full screen 1080p. 🤩
A still of the node graph. Have a look: 👀📊
Read 10 tweets
Mar 21
Mesh particles in #Unity3D. 🤩

Shader uses the system's custom vertex stream to read per-particle data, which can then be used to create variation and dissolve over time for each one.

#gamedev #madewithunity #realtimevfx #gameart
Using time quantization (rounding to nearest discrete steps to force a specific update framerate) to give it a more traditionally-animated look. 📈
Looks like it's squirting fire. I should add more particles. Embers, smoke, and such. 🔥
Read 4 tweets
Mar 19
Noise applied to a solid strip, with strength masked by horizontal gradient. Creates a the illusion of a wispy trial!

Throw in some remapping, bloom/post, and... 🤩

#gamedev #indiedev #vfx
Quantized time + colour gradients would be useful for styling and that toon look.

You could use it as a trail attached to either your mouse or a particle system. Imagine using it with this effect?

Plexus and all!

Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(