Home

Awesome

VolFx

Dev by NullTale<br> Itch Twitter Discord Asset Store Forum

FOR NON COMMERCIAL USE ONLY - version is no longer supported and cannot be used in commercial purposes<br> read the license, official release only on the AssetStore

VolFx Modular Vfx Post-Processing with selective applivation for Unity Urp<br> designed for visual effects creation ✧

Tested with 2022.2, 2023.2 Web (2021 not supported) (Unity 6 RenderGraph implemented in asset store version)

Features

----------------------------------------- - - - - - - - <br>

Selective post processing

Visual novel example, post processing applyed to scene objects by LayerMask to blur the background and fade character sprite<br> Thus you can make the appearance effect or apply graphical changes separately to scene objects <br>

_Cover<br>

Work with 3D

Selective application to a 3D object with depth buffer support

_cover

Custom texture processing

There is an example of light texture post processing generated by GiLight2D<br> Volume control allows to tweack texture at runtime to achive desiared light visualization<br>

_Light<br>

Extended AssetStore store version

Additional custom passets and option to support the project

_cover

Fx creation via timeline using ScreenFx

Timeline clip editing using post processing effects

_ScreenFxCover

Editor workflow

Selective application and customizable effects sequence<br>

_cover<br>

Install and usage

Install via Unity PackageManager <br>

https://github.com/NullTale/VolFx.git

Add VolFxProc feature to UrpRenderer add post-process passes to it, control via volume profile <br>

_Urp <br> <sup>* optionally configure the render event, source with output and volume mask</sup>

If use LayerMask as a source you need to exclude objects redering by filtering option in UrpRenderer asset to prevent twice rendering <br>(objects will be rendered by VolFx)

VolFxBuffers feature can be used to collect specific object to a texture to provide some texture source<br> that can be post processed at runtime and used later throug a shader as a texture or screen space mask for selective application

image

Example of global texture accessed via shader graph (name match, no exposed checkbox)

image

Build in Effects

VolFx was built to be highly configurable and most of the effects are powerful in their combination <br> There can be a number of custom Blit passes controlled via material for easy effect implementation.

Extended Color Adjustments

With the curve you can adjust the range on which part of the image to apply Color Adjustement <br> Other option are classic exept the alpha channel that used to adjust alpha chennel to blend images properly <br>

Adjustments

Bloom

Threshold controlled by curve, color made with gradient(support blending) <br> Also has some advanved options in effect pass like flickering, samples count and scuttering curve. <br> Basically extended remplementation of moust popular effect to process the images <br>

Bloom

Blur

Blur with radial and distortion options

Blur

Mask

Post processing mask from scene objects with alpha support

_mask

Custom Effect

There is an example of simple grayscale effect that can be found in Project Samples

_cover

All effect must be inherated from VolFxProc.Pass and then added to a VolFxRenderFeature <br> Material creates automatically using ShaderName attribute, VolumeSettings implemented using Unity API

[ShaderName("Hidden/VolFx/Grayscale")] // shader name for pass material
public class GrayscalePass : VolFxProc.Pass
{
    // =======================================================================
    public override bool Validate(Material mat)
    {
        // use stack from feature settings, feature use custom VolumeStack with its own LayerMask
        var settings = Stack.GetComponent<GrayscaleVol>();
        
        // return false if we don't want to execute pass, standart check
        if (settings.IsActive() == false)
            return false;
        
        // setup material before drawing
        mat.SetFloat("_Weight", settings.m_Weight.value);
        return true;
    }
}

Grayscale shader

Shader "Hidden/VolFx/Grayscale" // name of the shader for ShaderNameAttribute
...

half luma(half3 rgb)
{
    return dot(rgb, half3(0.299, 0.587, 0.114));
}

frag_in vert(const vert_in v)
{
    frag_in o;
    o.vertex = v.vertex;
    o.uv = v.uv;
    return o;
}

half4 frag(const frag_in i) : SV_Target
{
    half4 main = tex2D(_MainTex, i.uv);
    half4 col  = luma(main.rgb);
    
    return half4(lerp(main.rgb, luma(col.rgb), _Weight), main.a);
}

Feature work as a wrapper but can be extended by override low level methods, to gain access to a CommandBuffer and other rendering API stuff<br>

/// called to perform rendering
public virtual void Invoke(CommandBuffer cmd, RTHandle source, RTHandle dest,
                           ScriptableRenderContext context, ref RenderingData renderingData)
{
    Utils.Blit(cmd, source, dest, _material, 0, Invert);
}

PostArt

More effects can be downloaded separately for use in combination<br> If VolFx is installed they will work as part of the framework and will not appear in the RenderFeature list

Effects applied sequentially to a 3D object

_cover<br>