Triangular style shader question

soulfire

PostWed Jun 27, 2018 8:34 am

I would like to make this in Shaderforge
https://github.com/keijiro/Firefly
Image

I learned how to create dissolve shader with gradients and color Ramps but I don't know how would I set this turbulent dissolving with triangles.

Also, is it possible to create normal of this effect to be vissible as 3D?
User avatar
nuFF3
Location: Hell

PostThu Jul 05, 2018 8:31 pm

You should read the description on Keijiro's "Firefly" project:
Firefly is an example of use of Unity ECS (Entity Component System), C# Job System and the Burst compiler for implementing special effects.


It's not just a shader.
soulfire

PostFri Jul 06, 2018 1:01 pm

nuFF3 wrote:You should read the description on Keijiro's "Firefly" project:
Firefly is an example of use of Unity ECS (Entity Component System), C# Job System and the Burst compiler for implementing special effects.


It's not just a shader.


I know but I would like to create it in shaderforge as close as possible.

I thought to make vertical gradient (from B to W). Black would mean there is a first static texture shader triangles.
As time goes by to white gradient, there could be some turbulent distorsion effect mask which would have vertex offset.

This is just an idea but I don't know how to make it.
User avatar
nuFF3
Location: Hell

PostFri Jul 06, 2018 3:10 pm

soulfire wrote:
nuFF3 wrote:You should read the description on Keijiro's "Firefly" project:
Firefly is an example of use of Unity ECS (Entity Component System), C# Job System and the Burst compiler for implementing special effects.


It's not just a shader.


I know but I would like to create it in shaderforge as close as possible.

I thought to make vertical gradient (from B to W). Black would mean there is a first static texture shader triangles.
As time goes by to white gradient, there could be some turbulent distorsion effect mask which would have vertex offset.

This is just an idea but I don't know how to make it.

I think you're misunderstanding, it is not just a shader, it's more of a scripting project.
This is the only shader used in Keijiro's project:
TwoSided.shader

Code: Select all

Shader "Firefly/Two-Sided Standard"
{
    Properties
    {
        _Color("Color", Color) = (1, 1, 1, 1)
        _Glossiness("Smoothness", Range(0, 1)) = 0.5
        _Metallic("Metallic", Range(0, 1)) = 0
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }

        Cull off

        CGPROGRAM

        #pragma surface surf Standard fullforwardshadows addshadow
        #pragma target 3.0

        struct Input { float vface : VFACE; };

        fixed4 _Color;
        half _Glossiness;
        half _Metallic;

        void surf(Input IN, inout SurfaceOutputStandard o)
        {
            o.Albedo = _Color.rgb;
            o.Metallic = _Metallic;
            o.Smoothness = _Glossiness;
            o.Alpha = _Color.a;
            o.Normal *= IN.vface < 0 ? -1 : 1;
        }

        ENDCG
    }
    FallBack "Diffuse"
}

As you can see, it's just a simple shader with color, metallic and glossiness outputs.
Everything else is done by a bunch of .cs files.

This is not really something done in a shader editor or with any shader, unless you're doing C for graphics or other compute shader stuff.

Return to “Questions”



Who is online

Online users: Google [Bot] and 3 guests