⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    Built-In Render Pipeline

    Overview

    NeoFPS contains a number of shaders that have been created for the built-in (standard) render pipeline. These include various weapon optics shaders, effects, bullet trails and more.

    The NeoFPS shaders were created using Amplify Shader Editor.

    If you own this asset then you should be able to load the shaders up and modify them to suit your needs.

    Available Shaders

    All of the NeoFPS shaders are currently located in the folder: Assets\NeoFPS\Samples\Shared\Effects\Shaders

    They include the following:

    • NeoFPS_DissolveTrail_... are used for hitscan bullet trail. They start as a solid tracer line and then dissipate. The edge blend shaders fade off the tracer texture at the edges of the trail's line renderer.
    • NeoFPS_DistortionTrail is another bullet trail which provides a shockwave style distortion.
    • NeoFPS_FireballSheet... can be used for particle effects and pull flipbook style greyscale fireballs from the individual channels of a texture and use a gradient to add colour.
    • NeoFPS_FirstPersonWeapon_Stencil... are used for the first person weapon models that you need to be stencilled out when looking through stencil scopes (such as the scope mounting geometry).
    • NeoFPS_HeatHaze is an animated distortion which is used to add a rippling heat haze effect.
    • NeoFPS_PowerupGlow overlays a colourful animated shimmer over a standard shader to highlight objects in the scene.
    • NeoFPS_Shockwave_Standard provides a noisy distortion effect around the edges of a shockwave. The shockwave strength is influenced by vertex colour, making it useful for particle effects (start white and fade to black over lifetime).
    • NeoFPS_Water is a simple water surface shader used for the swimming demo scenes.
    • NeoFPS_WaterCaustics is a caustics volume shader that can be used to add a caustics lighting effect when underwater. This shader is only compatible with deferred rendering.
    • Glow/NeoFPS_Glow... shaders add a heat glow to first person weapons when overheating. The glow can be masked by position ranges, distance from a point (both object space) or using an alpha mask.
    • Highlight/NeoFPS_InteractiveHighlight adds a shimmer effect to a standard shader to help highlight interactive objects in the scene.
    • Optics/NeoFPS_HoloSightReticule is used for stencil based reticules that can only be seen through the glass of a holographic or red-dot sight. It also adds brightness and colour controls through the material.
    • Optics/NeoFPS_HoloSightStencil is used to define the area you can see the reticule through. It is not otherwise visible.
    • Optics/NeoFPS_HoloSightStencilGlass is used to define the area you can see the reticule through. It also uses a standard transparent base.
    • Optics/NeoFPS_LaserPointerBeam defines an animated noisy like with a stronger central line for a laser look.
    • Optics/NeoFPS_RedDotReticule is similar to the holosight reticule, but without the need for a reticule mask texture.
    • Optics/NeoFPS_RenderTextureScope displays a render texture, adding a parallax scope ring and fading to an opaque, reflective glass based on how far off the scope object axis the camera is.
    • Optics/NeoFPS_StencilScopeInner... are used for the parallax effect when looking through stencil scopes. Objects using this shader will only be visible through the lens of the scope.
    • Optics/NeoFPS_StencilScopeLens defines the stencil that the scope inner surfaces can be seen through, and which the NeoFPS_FirstPersonWeapon_Stencil... cannot.

    NB: The stencil scope shaders are currently not working properly with deferred rendering. A solution is being investigated

    Post-Processing

    The NeoFPS demos take advantage of Unity's Post-Processing Stack V2. This can be added to your project via the package manager, but it will also be added automatically (with a confirmation prompt) when applying the "Built-In" render pipeline setting in the Unity Settings page of the NeoFPS Hub.

    Post processing allows for effects and corrections to be applied to the rendered image each frame after the camera has been rendered. This includes effects such as bloom on bright lights and objects, screen-space ambient occlusion which darkens the image in recessed areas and colour correction. Post processing is controlled by placing volumes in your scene that point at a post-processing profile. Volumes can be set to Global, which means that the effects will always be applied, or Local which means that the camera must enter the collider that's attached to the volume. This can be used for situations such as tinting the screen blue when under water in the swimming demo scene. Any volume gameobjects should be placed on the PostProcessing layer.

    For more information on how to use post-processing, see Unity Post-Processing and Full-Screen Effects.

    In order for the post-processing effects to be shown on the camera, then the camera object must have a PostProcessLayer component attached. One quirk of the post processing stack package is that post processing layer component points at a data scriptable object that is generated when the package is installed. If you import an asset that uses post processing before you have the post-processing package installed then it will break that connection, and after installing post-processing Unity will constantly spew errors into the console until you close down and restart the editor. To get around this NeoFPS uses a component attached to its cameras called PostProcessLayerFix. This adds the PostProcessLayer component on entering play mode instead. If you want then you can remove the PostProcessLayerFix component and swap it with a PostProcessLayer after installing the post-processing stack. That way you will be able to see the post processing results in the game view while editing your scene.

    Extension Package

    Since the URP and HDRP extension packages that come with NeoFPS replace a number of the demo materials with SRP compatible alternatives, a built-in pipeling package is included. This can be found in Assets/NeoFPS/Extensions, called NeoFpsRenderPipeline_BIRP_v1.unitypackage. Importing this package will restore the demo materials back to their original state.


    See Also

    [Modular Firearms][8]

    Amplify Shader Editor

    Unity Post-Processing and Full-Screen Effects

    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX