Phi Dinh Profile picture
Nov 19, 2019 4 tweets 3 min read Read on X
WTF!
Why did no-one tell me you can get wireframe shading for free, just by encoding barycentric coords into mesh vertex colors? I've been stumped on this for YEARS!
There are like entire Unity assets that offer this, but you can do it with a few lines of #shaders code? ImageImageImage
Obviously screen space line thickness will vary by distance to camera, but maybe I can account for that somehow. It's not proper vector line drawing, but it'll do for a lot of cases
Good one Barry
OK! Here's an updated version where I can adjust wireframe thicknesses based on near/far camera distance values, much better! Thanks @XiexeVR for the suggestion
👇
Before/after pics ImageImageImage

• • •

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

Keep Current with Phi Dinh

Phi Dinh 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 @phi6

Nov 26, 2020
Unity NavMeshes! We've recently switched to them from our old custom A* pathfinding solution, and we've found it super fast, robust and accurate. Here's a few #UnityTips to help you make the most out of the NavMesh API
(thread)
#madewithunity
NavMeshAgents are great to get something working quickly, but they're a bit limited & prescriptive when dealing with finely tuned movement & steering. Instead, we use CalculatePath, passing the result to our own character controllers. No agents necessary!
docs.unity3d.com/ScriptReferenc…
Consider using NavMesh.SamplePosition instead of just passing your source and destination positions directly! This way our AI can create a best effort path even if the player or enemy positions aren't directly sitting on the NavMesh itself
Read 6 tweets
Feb 10, 2020
Finally ported my old particles to HDRP shadergraph!
And poor @Skepsisology has been working on converting our hundreds of VFX prefabs to the new renderer, but it's totally worth it!
Recompile VFX uses 4 different shaders.
Here's how we made them (thread)
#madewithunity #gamedev
First up is the unlit opaque particle shader. This is the most important part of the VFX, and provides all of the core glowing shapes. The bloom ramp is controlled by particle value (intensity), and the alpha cutout is controlled by particle alpha. Image
Next up is fog/smoke/steam particles. This is an unlit transparent shader with an inverted fresnel fade and soft particle depth. We can layer these up to create a faux volumetric effect! ImageImage
Read 7 tweets
Dec 16, 2019
I ported Recompile's hologram shader over to HDRP Shader Graph!
Also added a couple of new features & improvements...
Here's how it works (see graphs in thread)
#madewithunity #gamedev #unitytips
It's basically a transparent lit shader with two layered screen space scanlines, fresnel glow, flicker, and some glitchy, wibbly wobbly vertex extrusion thing
For the scanlines, we simply scale the screen UVs and use the fraction node to get a gradient for each line. No textures required! We also animate/pan this along the Y axis
Read 5 tweets
Aug 15, 2019
Finally added alpha dithering to our particle shaders! @Skepsisology has been requesting this for ages.
We use it for 2 things: fading out smoke that's too close to the camera, and fading out smoke over lifetime.
Here's how we did it (THREAD):
#gamedev #unitytips #madewithunity
Btw here's the YouTube version that doesn't suffer from Twitter's video compression so you can see the effect clearly (2/9)
Firstly, fading out particles close to the camera. In the vert function we get the distance between the world space vertex and the camera position, and normalize that with our desired dithering distance (3/9)
Read 9 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!

:(