SamuZai
pucklovesgames

pucklovesgames

patreon


pucklovesgames posts

Foliage Wind Movement - FILES

Here's a very simple foliage shader than moves in the wind, and a script that sets the required global shader values. To change the direction the wind is blowing, simple rotate the object that the WindControl script is on.

It works by panning a world space noise texture across the mesh and offsetting the vertices.

To control the strength of the effect over the foliage, you'll need t...

View Post

Glow on Mouse Over via MaterialPropertyBlock - FILES (free!)

I've been put onto MaterialPropertyBlocks as a way to avoid creating Material Instances, useful when you just need to make a small change to an existing material (thanks Daniel Snd!) - so I thought I'd put together a little demo scene using them to create a Glow on Mouse Over effect - with an included pop wobble and fade afterwards.

Now I *think* this is friendly on memory and doesn't cre...

View Post

Hit Impact (Breath of the Wild inspired) - FILES

Here is a flexible hit impact effect, using a simple script to fire off a bunch of particles at the same time. You can use it by just spawning the prefab and having triggerOnStart = true (although you will have to destroy it afterwards), or better yet, just keep it around and call Trigger() when you need it.

I plan on expanding out the particle multi-emitter to make it more flexible and c...

View Post

Post Process (PPV2) Outlines - FILES

I've converted my old Shader Replacement Jittery outline over to the Post Processing Stack. It no longer requires a second camera and a shader replacement pass and a render texture! Hooray!

I've also made up a bunch of other outline variations that you can play around with. I've separated them out into different post processing effects to keep things lighter, but if there's a combination ...

View Post

Glow Dissolve Teleport - FILES

Here's a Breath of the Wild-style teleportation effect, which combines a glow dissolve shader with some trail particles, all wrapped up in a helpful script.


I've tried to make it as flexible as possible - there are a bunch of tweakable settings to create different dissolve/teleport/di...

View Post

Smoke (and Fire) Line Renderers - FILES

Here's a fun way to do dynamic smoke trails and fire without particles, using lineRenderers. It's not the best for realistic smoke, but if you're after stylised trails, you can get some nice smooth motion with this approach.

As with the other lineRenderer FX, most of the work is done via script and not in shader. Although I am pretty happy with the toony fire that's included here. There a...

View Post

Puck Loves Games going forward.

Hi Everybody!

This is a post to explain my intentions for this Patreon going forward.

The first thing that's new is I've put together a contents page at www.pucklovesgames.com which lists all the assets that are currently available to patrons. I've had some people unable to find older assets, so hopefully this makes ...

View Post

Rain shader (with blurry refractions) FILES

Here's a rain shader that uses a blurred screen texture (done via a command buffer) to create a bloomed light refracting through the drops. As its base, it's using the blurry refraction example from here ( https://docs.unity3d.com/Manual/GraphicsCommandBuffers.html ).

The particle system ha...

View Post

Electricity Line Renderers Extras - FILES

Includes a proximity zapper when you don't want to place end positions manually.

View Post

Electricity Line Renderer - FILES

I've put together a little script to make Zappy Zaps. 

The shader itself is about as basic as it gets - all the work is done in script. I've included a few happy debug gizmos so you can position the electricity exactly where you want it, including letting it arc in a curve and randomising the middle position for some nice variation. I hope it comes in handy!

2019-10-29 04:58:12 +0000 UTC View Post

Projectile Trails - FILES

Here's a way to make smokey projectile trails using the standard Unity Linerenderer. It can be used for standard gunfire, lasers, and also a lighting gun type of effect. -ZAP!-

 A lot of the work is done via script, to pass data to the line renderer and material.

Each projectile trail uses it's own Linerenderer and Material instance, which works fine, but isn't ideal or as opti...

View Post

Toonsplosions 2 - FILES

I had another go at the chunky polygonal tool explosions, this time simplifying the shader to not require custom vertex streams at all - everything is done with the point light. There wasn't a real reason to leave the non-lit shader stuff in there since it should probably always be used with a point light anyway.

I also split off the spikes so that it's a more generic 'lit smoke' shader, ...

View Post

Toon Explosion - FILES

I had a crack at a toonsplosion effect after being (re)inspired by Breath of the Wild toony effects. Particularly this gorgeous explosion by  Gregory Oliveira https://twitter.com/godsgreg/status/1178716163489927169?s=20 

I went with a chunky polygonal look for this so far, but it...

View Post

Community requests and updates

Hi everybody! I've been making up a few community requested shaders and effects over on Discord, so here's a quick update for those of you who missed them but wanted to have a look. If you aren't on Discord already, head on over, I'm almost always there to answer questions, and to work up quick shader examples like these. I love requests, hit me up!

 -------------------- 

...

View Post

Lasers - line renderers and scanning arcs - FILES

Two simple laser type effects. One using a line renderer and raycasts that would work well as a laser sight on a weapon, and the other one that's more like some sci-fi scanner but that doesn't have any collision checks.

I started by playing with an idea of how to make cheaper 3d noise - it didn't pan out the way I wanted it to, but it's serviceable for this effect - the "smoke" in these l...

View Post

Noisy Pulsing Spheres - FILES

This is a  different approach to that pulse shader from earlier- this one is much more flexible since you don't need to have it on all the environment materials - it uses an expanding sphere to draw the circular edge on the ground (via depth fading).

There's also a variation which adds in a rim (via fresnel), and a third one which also distorts the interior of the sphere, for EMP typ...

View Post

World Space Noise Pulse - FILES

 (Sorry, reupload, the last post was behaving funky)

Here's a simple shader that shows how you could send a wobbly pulse out over the environment using world space (top down mapping) noise. It's very bare bones, but it should give you an idea of how to achieve similar effects.

Let me know if you have any questions or suggestions!

2019-08-16 01:10:17 +0000 UTC View Post

Mesh Fireball - world mapped

Here's a world mapped fireball, just using a sphere mesh that's been stretched, tapered and then bumped up with noise. It has vertex colours (alpha) painted in a gradient from one side of the sphere to the other to control the taper/stretching area.

Instead of using 2 meshes for the layers of fire, it might be possible (better?) to do it with an outline in the shader - just to keep it dow...

View Post

Fade Near Camera in shader (no raycasts needed)

A good approach for stopping foliage, grass, and other objects from getting in the way of the camera is to fade them out via the camera depth (or distance from camera) multiplied by a circular screen space mask. You can use dither transparency so you don't need to swap to a transparent shader, that way they can remain opaque, shadow receiving objects.

This is all done in shader, so it wor...

View Post

Silhouette Light Plane (Abzu Inspired) - FILES

A nice simple way to pop out the silhouette of a cave entrance or other level detail is to use a silhouette card to fill the area with a tint of light. With some depth fade it gives the impression of a localised fog that fades away as you approach - great for helping to highlight an area in a controllable and stylised way.

I first heard about it in this wonderful talk about the Art of Abz...

View Post

Weapon Trails with Cut lines - FILES

A pretty simple idea really, but something that I think looks pretty cool - add in a stepped depth fade where a weapon trail meets underlying geometry, to create a temporary 'cut line' as the trail passes through other geometry. The same way you might add a cheap shoreline to a water shader. Works well on weapon-aligned trail renderers and 'swish' meshes.

You can get a reasonably consiste...

View Post

Triplanar Toon Environment Shader - FILES

One of the exciting things I'm working on lately is resurrecting a passion project I've been sitting on for a while. A toon shaded adventure game with the vibes of Zelda but the combat of Dark Souls. Part of that process has been updating and improving the Shaders. I'd previously made them all in Shader Forge, so I'm bringing them across to Amplify Shader Editor and adding some of the new trick...

View Post

Toon Shader tweak - Saturated edge + Rim Wrap - FILES

There are many ways to make a toon shader, and many bells and whistles you can include on it depending on the way you want your game to look. Here's a basic example toon shader with some of the little touches I like to add to my own toon shaders.

The main feature that I'm a big fan of, and I include in every toon shader, is that the light wraps around an object to create a rim light even ...

View Post

Sketch Shader FILES

Here's a sketchy shader, with cross hatched shadows, outlines (internal and external) and a matcap rimlight. It's also using that funky "object stabilised screenspace mapping" that I worked out here that locks the hatching to the object and prevents a lot of texture swimming when the camera or object mo...

View Post

3d Skybox System (+huge world float imprecision workaround) FILES

I've been playing around with a 3d skybox setup lately. I haven't polished out all the rough edges yet but I wanted to share what I've got so far to let people have a play and give any feedback and suggestions.

One limitation with Unity is that it doesn't handle extremely far distances very well. Just from a rendering perspective - shadows fade out very early, and then the camera clipping...

View Post

Transparency + Shadows, is it even possible? (yes) - FILES

Rendering shadows on transparent surfaces is not a trivial thing to do in the Unity standard rendering pipeline, due to the way transparency is rendered after all the other shadow receiving opaque geometry. But by re-using the same shader replacement trick from the last two FX posts, we can force Unity to render at least one extra pass of shadows on transparent materials. 

Basically ...

View Post

Coloured Shadows (Interior and Rim) FILES

I've tweaked the previous Shader Replacement effect that was used for a jittery Edge Breakup, and used it instead to add colour to the shadows as a post processing effect.

It's pretty much the same setup - using shader replacement to create a render texture mask that is then fed into a saturation material. The mask uses split the shadow interior, shadow rim, and everything else into separ...

View Post

Tweak to the Edge Wobble = Jitter Outlines! (FILES)

With a small tweak to the post process material used in the previous Edge Wobble effect, you can get a pretty funky jittery outline. Instead of just wobbling the UVs of the screengrab pass, you wobble the outline mask, one minus it (so the white outline mask becomes a black outline), and then multiply it back on the screengrab.

Use the exact same setup as the previous effect, but just rep...

View Post

Edge Breakup FILES

I've been working on a little Edge Breakup effect, for non-photorealistic rendering uses. I first saw a lovely implementation of this in the VR short "Age of Sail" - I highly recommend you check that out if you have a VR headset, it's free on Steam as part of the Google Spotlight Stories. If you don't have a VR headset, you can view a recording of it on youtube here:  2019-04-15 05:10:14 +0000 UTC View Post

2d Raymarched Smoke

Start with a texture as opacity. Here I'm using a flat splat texture to better show the offset layering.

Take a copy of this, offset it by the LightDir in tangent space by adding to the UVs. Do this again with an increased offset and then layer them together. This is the shadow side. 

...

View Post