NokiMo
RED_SIM
RED_SIM

patreon


Real Weapon Sights Shaders | Release

Hey! It's been a while, but now I'm here with a new really useful shader asset.

Real Weapon Sights Shaders asset includes two types of shaders:

Video above illustrates how this shader works. It perfectly simulates real weapons optics.

Download Real Weapon Sights Shaders:

>>> Download it here <<< 

Note: To download and use this asset, you should be at least my Tier III patron.

How to use Collimator shader?

Collimator shader is an almost drag and drop thing. You need to place a default Unity's quad inside of your sight's model and apply the collimator shader material.

If you want to use it with your own mesh, not that your mesh must be flat and have a proper UV. I recommend to use a proportionally unwrapped UV map, that almost matches a UV map of default unity's quad.

There are two variants of the collimator shader:

Regular Collimator shader - just a transparent collimator shader.

Collimator Additive shader - uses additive blending, which is more correct for this kind of scopes and more cheap to render. But it can cause a problem of seeing reticle while looking at a bright object.

Collimator shader uses a reticle sprite sheet to fast switch between reticles using a Type property. To use a custom sprite sheet, you can specify your own count of columns and rows in the Sprite Sheet property.

Blackout is a property available only in Additive collimator shader version. It just makes the view through the sight optics darker.

Emissive power just controls how bright the reticle is.

Reticle size scales the reticle.

Zeroing moves your reticle up and down for the long distance shooting.

How to use Scope shader?

Scope shader simulates real weapons optics. You can use it with a default Unity's quad mesh or with your own UV mapped mesh.

If you want to use it with Unity's quad mesh, I recommend you to choose Scope Sight Masked shader version. It masks the corners of the quad to make it circle. It makes it possible to just move a sight quad into your sight model to the right place and use it like this.

If you want to have your own mesh for this shader, be sure that your mesh is flat, including it's normals, otherwise it will not work correct. You also must have a correct UV map.

Scope shader uses a separate camera and a render texture to render the view. To setup it, just check the example scene included into the asset.

HAVING SEVERAL SCOPES IN YOUR SCENE

Note that every scope should have it's own unique material and it's own render texture assigned to it's own camera. Otherwise you'll se the same image in every scope you use in your scene. But also not that having multiple cameras in your scene heavily reduces performance! Please try not to use more then one active scope camera at the same time! If you want to use scopes for your VRChat world, you need to make our own Udon script to cull cameras that are far away from you. If you are a game developer, not related to vrchat, I would recommend to use the same render texture and the same camera for all of the scopes, but "teleport" the scope camera to scope closest to the player, or the active one.

Lens Color, Normal Scale, Smoothness and Metallic properties configures the lens glass appearance. But it only visible when looking to the scope from a specified distance. This distance can be configured be Fade Distance Close and Fade Distance Far variables.

Reticle Texture is just your regular reticle texture. You can configure it's color by Reticle Color value.

Reticle Emissive Texture is a glowing reticle texture which is optional. You can configure it's color by Reticle Emissive Color value and it's brightness by Emissive Power value.

Reticle gradient is the circle gradient which is around your reticle.

Reticle Depth specifies how far the reticle focal plane is displayed inside of your scope.

View Scale basically scales the reticle focal plane, including the reticle gradient.

Reticle Scale only scales the reticle texture.

Zeroing moves your reticle up and down for the long distance shooting.

Mask Depth, Mask Scale and Mask Gradient controls the optical masking effect, basically an annoying circle mask that limits your view through the scope. Just like in real life!

Vignette is an overlay circle gradient that gives to your sight a darker look at the sides.


Shader performance

All the shaders are really lightweight, there is no complex logic inside. Just don't use lots of cameras in your scene and everything will be great!


Rights of usage

Since you been my Patreon Tier III supporter at least once, you can use this asset in any of your projects. You are NOT allowed to share or resell this asset to anyone. You can modify the asset for yourself but still not able to share or resell the modified version!

This asset uses free models by 3DGunsmith and Pokudinev. Demonstration purposes only.

Sources:

EOTech scope: https://sketchfab.com/3d-models/eotech-xps2-1-holographic-scope-85bafd78f4ca4b8c85d8cc63637cd37d 

PSO-1 scope: https://sketchfab.com/3d-models/pso-1-6826bb7852934647a4ab9e3e9706854b 

Real Weapon Sights Shaders | Release

Related Creators