Dual Render Scope Shader Tutorial

Dual render shader when zooming in on scoped weapons.

Dual render shader when zooming in on scoped weapons.

Material swap to glass shader when zoomed out. Glass is tinted either blue or red depending on what team the player is on.

Material swap to glass shader when zoomed out. Glass is tinted either blue or red depending on what team the player is on.

Render camera setup on prefab level.

Render camera setup on prefab level.

Complete shadergraph.

Complete shadergraph.

Render cam shader logic.

Render cam shader logic.

Reticle logic. This can be expanded to use custom reticle shapes.

Reticle logic. This can be expanded to use custom reticle shapes.

Fresnel FX and final color composite.

Fresnel FX and final color composite.

Simple 'dual render' shader for a side FPS project I worked on about a year ago. This effect is inspired by how zooming in on scoped weapons works in games like Call of Duty. Always been a fan of this look as I feel it is less distracting to the player and looks very modern.

Very simple setup. When scoping in the weapon a material swap occurs, switching from a basic opaque glass material to the dual render shader. The glass is tinted to let the player know what team they are apart of. Which was inspired by TF2.

The shader takes a render camera, a reticle shape and adds them together, then adds a fresnel effect to sell the roundness of the scope. Final color is added at the very end. The shader is completely unlit and opaque. No transparency needed.