Loading...
87
2 years ago

"Ghost shader" I made a long time ago as an experiment in Unity.

#Unity #Shader #Ghost #Material #Transparency


The idea was to change the transparency instead of the brightness of the illuminated surface. By using the Culling Mask, you can make the material illuminated only by selected light sources.

		
			half4 LightingGhost (SurfaceOutputStandard s, UnityGI gi)
{
	half4 c;
	half t;
	c.a = dot(s.Normal, gi.light.dir);
	if(c.a < 0) c.a = 0;
	c.a *= s.Alpha;
	c.rbg = (s.Albedo + gi.light.color) * c.a;
	t = c.b;
	c.b = c.g;
	c.g = t;
	return c;
}

		
	

I don't remember why I swapped the green and blue channels



0 comments

Loading...

Next up

Lord Vader decides to delete his Minecraft world

Made in Blender.

#StarWarsArt #FanArtFriday #ArtWeeklies #Minecraft #Blender #Animation #3D #3DArt #DeathStar #Space

What's Your Favorite Video Game Console Of All Time?

PC - I've never had a console.

#GJAsks #Blender #3DArt #3D #PC #Room #Darkness

Diglett as chocolate cake

Made in Blender.

#MyPokeCake #Pokemon #Diglett #Cake #Blender #3D #3DArt #Modeling

Happy #WIPWednesday!

Are you working on a game?

Making some art?

Practicing a song?

Something else?

Tell us in the comments!

My Pokémon Baking Book arrived today

#MyPokemonBakingBook #InsightEditions #Giveaway

Happy #WIPWednesday!

Are you working on a game?

Making some art?

Practicing a song?

Something else?

Tell us in the comments!

Chibi drawing by Aikeji, modeled and animated in 3D.

Made in Blender.

#Blender #3D #3DArt #Modeling #Animation #Chibi #Aikeji

To this day, I don't know how they did it

#PhotoDay

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

What's Your Most Feared Minecraft Mob?

My first thought was this green guy who appears out of nowhere and erases all your efforts in one second

#MostFearedMob #ArtWeeklies #Blender #Animation #Minecraft #Cave #Creeper #3D #3DArt