Skip to main content

Posts

FEATURED

Tri-Planar Terrain Shader

How The Tri-Planar Terrain Shader Looks Like Apart from the manually drawn tile footpath the cliff walls and grass has been generated through a tri-planar shader. How The Tri-Planar Terrain Shader Works The shader that we make will work with the existing terrain system and no need for any custom scripts.
The first two textures provided in the terrain settings will be used to texture the terrain :
*Notes:-
First Texture Index:- Texture that appears on cliff sides.Second Texture Index:- Texture that appears on flat surfaces.Any subsequent textures can be used to draw on top of this as usual.Drawing with either first or second texture slot acts as a eraser removing subsequent textures Terrain Shader Tutorial The shader we will make will be working on top the existing terrain shader that Unity provides us.  So that will require accessing the Unity shader repository for your specific version of Unity.
The version of Unity I used to create the shader is version 2017.4.
Most likely there won&…
Recent posts

3D Art Assets / Packages / Sets Of The Month [ September, 2018 ]

The Best Art Assets Of The Month *Note: These assets are separated based on the category : ENVIRONMENT, CHARACTERS & PROPS ENVIRONMENTS 5.Dynamic Nature - Starter 4.2D Winter Environment 3.Mysterious Wood 2D Set 2.The Hunt - Cyberpunk Pack 1.Medieval Village Environment
CHARACTERS 5.Character Editor: Megapack 4.Horror Shadow Character Pack 3.Low Poly Animated Dinosaurs 2.Horse Animset Pro (Riding System) 1.Low Poly Skeleton CrewPROPS 5.PBR Stage Equipment 4.PBR Bar Props 3.Office Setting & Furniture Bundle 2.Survival Health Pack 1.Industry Props Pack 3 Don't forget to share these wonderful assets with your colleagues and friends.
Check out more such Unity Asset Store Gems : HERE
Support Bitshift Programmer by leaving a like on Bitshift Programmer Facebook Page and be updated as soon as there is a new blog post.
If you have any questions that you might have about shaders, C# or Unity development in general don't be shy and leave a message on my facebook page or down in t…

Introduction To Regular Expressions [ Regex ]

What Is A Regular ExpressionRegular expression or regex for short is a sequence of characters that defines a search pattern.
Let me simplify this for you.
Imagine you're writing a huge assignment or a report then you realize you misspelled a word and apparently the word was used a couple of hundred times throughout your document, now any sane person living in the 21st century would :
find and replace->”misspelled word”->”correct word”.

Have you ever wondered how the computer checks for the word?
How the words are magically found and replaced?
It just searches the entire document for “word-to-be-searched” and replace the string with the new one.
Imagine this scenario, you are asked to redact phone numbers from a letter, now you don’t know any of the numbers personally, and since the letter contains plenty of numbers that are not just phone numbers and those should not be redacted what would you do then? This is where Regular Expressions come in to play, a regular expression is bas…

Access Reflection Probe Data For Custom Shaders

The Unity shader documentation regarding reflection probes is pretty minimal and not at all comprehensive.
This short tutorial is intended to bring reflection probe functionalities to the forefront your future shader writing endevors which is a fancy way of saying "Look at this cool stuff and go and use it somewhere" 😏
Here we will try just the bare minimum of making a shader that reflects the cubemap data from reflection probe and displays it on the object.

These reflection probes are basically objects that store a complete image of the environment surrounding it into a cubemap which then can be read by shaders to create various effects.
More information on how reflection probes work in Unity can be found here :
Using Reflection Probes In Unity

I am not going over how to set up Reflection Probes here only how to access them inside our custom shaders.
So this is what we will be making:
The reflection probe takes in the cubemap only if it is within it's range otherwise i…

Shader Optimization Part 1

The process of shader optimization can seem like trial and error... in fact, that's how it is most of the time.
Most of the time shader optimizations could be boiled down to educated guesses because each time a shader gets compiled, the GPU driver of that specific hardware is what converts your code into actual machine code, therefore, the machine code generated will be different for each GPU and the driver itself might perform some optimizations on top of your's which won't be available on another GPU, thereby making it difficult to have a standard way of writing optimal shader code.

So the best way to know for sure is to actually test it on the hardware you are targeting.
With that said, Here are some universal best ways of getting your shader to perform better.😅 Do Calculations On Vertex Shader The most commonly used case for this is lighting, an example would be Gouraud lighting, where lighting calculations are done per vertex but at the loss of quality.

Some calculatio…

Productivity Upgrade - Unity Asset Store [ September, 2018 ]

Productivity Boost - Assets That Help Make A Better Game In Less Time *Note: These assets are not arranged in any way, no comparison is done. They are just really cool assets that will help make your entire workflow more streamlined as well as deliver output faster.😁.
Well a new month has arrived and it's time to see more of those cool assets on the Unity asset store.
8.Camera Transitions 7.Dialogue System For Unity
6.Tutorial Master 2
5.Eliot - AI Framework
4.CAT Game Builder
3.Rucksack - Multiplayer Inventory System
2.SS2d : Sprites Generator & High Performance RTS System
1.Lean Touch+
Don't forget to share these wonderful assets with your colleagues and friends.
Check out more such Unity Asset Store Gems : HERE
Support Bitshift Programmer by leaving a like on Bitshift Programmer Facebook Page and be updated as soon as there is a new blog post.
If you have any questions that you might have about shaders, C# or Unity development in general don't be shy and leave a me…

Visual Upgrade - Unity Asset Store [ September, 2018 ]

Visual Overhaul - Assets That Turn Mediocre Into Drool Worthy *Note: These assets are not arranged in any way, no comparison is done. They are just really cool assets that will help make your game look at least a bit better. 😁
8. Bat Particles
7.GPU Instancing Animation
6.Colored Pencils
5.Graphics Adapter Pro
4.Sleek Render: Mobile Post Processing
3.1000+ Effects pack
2.COLR - Coloring Redefined
1.AllSky

Check out more such Unity Asset Store Gems : HERE
Don't forget to share these wonderful assets with your colleagues and friends.
Support Bitshift Programmer by leaving a like on Bitshift Programmer Facebook Page and be updated as soon as there is a new blog post.
If you have any questions that you might have about shaders, C# or Unity development in general don't be shy and leave a message on my facebook page or down in the comments.

Assets Worth Checking Out