Jump to content
  • Advertisement
Sign in to follow this  
GameObject

How to create shader that fades based on two different connecting surface angles

This topic is 1004 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working with Unity 5.x and trying create a shader that creates shadows at the edges of voxels similar to games like Trove and CubeWorld. You can see in this image below from my game (first image) that the shading between voxels is simply not there even with additional light sources. I believe that games like trove (second image) and cube world (third image) use a shader that creates a shadow between two voxels based on whether the two surfaces are meeting on converging right angles. Does anyone know how one would attain this effect in writing a unity shader? Right now I'm using the unity standard shader.
[attachment=29376:shadbetweenboxes.png]
 
Notice the shadow at the corner of two voxel surfaces, there is always a fading shadow at each voxel on two different planes.
[attachment=29377:shader2.png]
Here you can see two the same effect, there is a shadow at the edge of two different angles as the shadow fades.
[attachment=29378:shader3.png]

Share this post


Link to post
Share on other sites
Advertisement

Yes that's it, thanks. Unfortunately the Unity SSAO is almost useless so I'll have to find another solution or write my own Minecraft like AO.

 

Was reading through this, http://0fps.net/2013/07/03/ambient-occlusion-for-minecraft-like-worlds/, looks like it isn't too hard but within Unity sort of stuck on how to us a shader to go through the voxels or somehow join my chunkmeshcreator with the shader(?) blink.png

Share this post


Link to post
Share on other sites

Unfortunately the Unity SSAO is almost useless...


Why do you say that? I missed the "Unity" part. Sorry.

Edited by MarkS

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!