Skip to main content

Posts

FEATURED

Shader Optimization Part 1

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 calculations need not be done per fragment and still retain the desired quality such as UV co-ordinate modifications and world space/local space calculations.

A good example would be rotating the UV coordinates of the skybox texture which will, in turn, pass the modified UV coordinates to the fragment shader which will render the rotated skybox.
Even fog can be approximated per vertex and still get good results. Store Complex Functions In Texture A good example of this is when you need noise to achieve an effect, Most of the time sampling from a noise texture is more performant than calculating per it fragment/vertex.
Example:

Another example would be ambient occlusion, Baked in ambient occlusion basically comes for free as it can be considered as a part of the albedo/diffuse texture itsel…
Recent posts

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.

Fortnite Procedural Construction Animation Shader

Fortnite Construction Shader This shader is loosely based on the one that was presented by the Fortnite developers in their GDC talk: Inner Working Of Fortnite's Shader-Based Procedural Animations.

 Here is what we will end up with:
This technique requires you to author the 3D model in a certain way, More or less how those Fortnite developers did.
So we need the authored 3D model and the shader that uses data we get from the model to achieve the desired effect.

There are some nuances here and there so make sure you don't miss out on the details.😗
The first step will be preparing the 3D model and putting in the required data. I used Blender 2.79 but any 3D modeling software would do.
3D Model PreparationModel It
Apply Vertex Colors: For the direction of flight
Each color is a component of a vector (x, y, z). This will be considered as local space.
Values range from -1.0 to +1.0 for each component.
Negative values are achieved by using values of less than 0.5 and positive values wi…

Advanced Billboard Shader + World-Space UI Support

Advanced Billboard Shader + World-Space UI SupportAs you know billboarding is basically a plane with a texture on it that always facing the camera.These are some examples of what we are going for. This tutorial is going to be pretty straight-forward and easy to follow along you will learn how to make a billboard shader that not only keeps looking at the camera but also keeps its relative scaling intact.We will also provide an option to keep it rendered on top of all the other objects in the scene. This will be most useful for world-space UI that needs to be rendered on top of other geometry.We will be making 2 shaders here,Modified Default Unlit shader :- This one is a general shader ( easy to modify furthur ).Modified Default UI shader :- This one supports whatever a UI shader supports along with our billboarding capabilities. So let's get started with making the first one. As usual create a new Unlit shader and dive into the properties we need.Properties { _MainTex ("Texture…

Get Started With Compute Shaders

Getting Started With Compute Shaders The shader that's a 'Jack of all trades'. Of course, it's the Compute Shader.
These beauties allow your general purpose parallelized code to run on the GPU.
These can be used to do some pretty cool stuff that would be pretty difficult to do otherwise even with multi-threaded CPU code.
When bringing up Compute shaders in the context of video games, It's mostly used in physics simulations and freaky looking particle effects and to a lower extent as a core part of some post-processing effects and render pipeline optimizations such as various culling operations like occlusion culling.

The most important thing about compute shaders is that it allows for more efficient communication from CPU to GPU side and vice-versa. That basically means you can send arbitrary data to the GPU, let it do some work and then read it's output and then do whatever you want with it.
You can now see that how different compute shaders are when compared …

Visual Upgrade - Unity Asset Store [ August, 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.Polygon Arsenal- Polygon Arsenal is a bundle of 550 (approx) particle effects. Works best with bloom enabled in low-poly and stylized environments.
The effects are sorted into 3 categories: Combat, Environment and Interactive.
7.Sleek Render: Mobile Post Processing Stack - Ultra Fast Bloom, Color Grading and Vignette post processing effects created specifically for mobile devices.
Bloom uses two-pass downscaled blur.
Color grading doesn't use any LUTs (color overlay) and thus really fast on OpenGL ES 2.0 grade hardware.
Vignette is calculated in a downscaled pass and thus really fast to calculate. It's also runtime tweakable without additional overhead..
6.Car Paint - Pro - Car Paint Pro will help you to simulate next level photo-realistic visua…