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

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

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!

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

Made in Blender.

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

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

Lord Vader decides to delete his Minecraft world

Made in Blender.

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

Comparison of view transforms in Blender using Christmas candles as an example

#Blender #3D #3DArt #ViewTransform #Christmas #Candles

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