Giter Site home page Giter Site logo

shaderforge's People

Contributors

estecka avatar freyaholmer avatar lasersink avatar roytheunissen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shaderforge's Issues

How can I define function through my SFN_Nodes?

Hi Holmer
I love shaderforge and I like to Improve your repository :)

Shader Forge has a problem... It generate All shader Inside fragment shader
without declaring functions
It makes hard to reading shader
It create repetitive definitions in the shader

for example when I use Rotator Instead of declaring function It will generate Inside of fragment shader

float2 node_5074 = (mul(i.uv0-node_5074_piv,float2x2( node_5074_cos, -node_5074_sin, node_5074_sin, node_5074_cos))+node_5074_piv);

You could define it as Rotation function:

float2x2 rotate2d(float _angle){
    return float2x2(cos(_angle),-sin(_angle),
                sin(_angle),cos(_angle));
}

I'm working on procedural generation

procedural

Shader "Hidden/Shader Forge/SFN_FBMNoise" {
    Properties {
        _OutputMask ("Output Mask", Vector) = (1,1,1,1)
        _XY ("XY", 2D) = "black" {}
    }
    SubShader {
        Tags {
            "RenderType"="Opaque"
        }
        Pass {
        CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #define UNITY_PASS_FORWARDBASE
            #include "UnityCG.cginc"
            #pragma target 3.0
            uniform float4 _OutputMask;
            uniform sampler2D _XY;

            struct VertexInput {
                float4 vertex : POSITION;
                float2 texcoord0 : TEXCOORD0;
            };
            struct VertexOutput {
                float4 pos : SV_POSITION;
                float2 uv : TEXCOORD0;
            };
            VertexOutput vert (VertexInput v) {
                VertexOutput o = (VertexOutput)0;
                o.uv = v.texcoord0;
                o.pos = UnityObjectToClipPos(v.vertex );
                return o;
            }


            // Author @patriciogv - 2015
            // http://patriciogonzalezvivo.com

            float random (in float2 st) {
            return frac(sin(dot(st.xy,
                                float2(12.9898,78.233)))*
                43758.5453123);
            }

            // Based on Morgan McGuire @morgan3d
            // https://www.shadertoy.com/view/4dS3Wd
            float noise (in float2 st) {
            float2 i = floor(st);
            float2 f = frac(st);

            // Four corners in 2D of a tile
            float a = random(i);
            float b = random(i + float2(1.0, 0.0));
            float c = random(i + float2(0.0, 1.0));
            float d = random(i + float2(1.0, 1.0));

            float2 u = f * f * (3.0 - 2.0 * f);

            return lerp(a, b, u.x) +
                    (c - a)* u.y * (1.0 - u.x) +
                    (d - b) * u.x * u.y;
            }

            #define OCTAVES 6
            float fbm (in float2 st) {
            // Initial values
            float value = 0.0;
            float amplitude = .5;
            float frequency = 0.;
            //
            // Loop of octaves
            for (int i = 0; i < OCTAVES; i++) {
                value += amplitude * noise(st);
                st *= 2.;
                amplitude *= .5;
            }
            return value;
            }

            float4 frag(VertexOutput i) : COLOR {


                // Read inputs
                float4 _xy = tex2D( _XY, i.uv );

                // Operator

                float2 st =_xy;

                float3 color = float3(0,0,0);
                color += fbm(st*3.0);

                float4 outputColor = float4(color,1.0);
                // Return
                return outputColor * _OutputMask;
            }
            ENDCG
        }
    }
}

But What Is my problem?

My Problem Is that I can't add functions through mySFN_FBMNoise.cs and I have to convert them to variables!!

Shader Editor window out of display size

Currently opened shader editor window size is bigger than screen size. When the editor window is maximized, close button are hidden in the right side of the screen. It don't fits properly

Unable to open node editor view

I have some old shaders form 2018 that I'd like to use as a reference for shader graph work, but I'm unable to find a way to open the Shader Forge window. There's no option to "Open in Shader Forge" or to open the Shader Forge window via the "Window" menu.

Could you update Shader 1.06 Unity 4.7.2f1

Hello.
I am game developer. I like to use shader forge in my works.
But, I work on Unity 4.7.2f1 in current project.

So, If you upload shader forge 1.06 version to github,
I will be happy and I can fix and upload on github.

^^!

Stylesheet on website not loading correctly

The stylesheet (css) is not loading on the website (in chrome).

This is because the page is served through through https, but the css is served through http. Chrome doesn't like this.

I assume this is something that later versions have restricted since the website was created.

Sometimes shaders are compiled with float values having commas instead of dots.

I searched a bit online and it seems to be because of the computers culture settings. For some reason some program in my computer switches my culture settings, while using Unity, to have number values with commas, and when the shader is created it uses commas in the floats.

I got it fixed by adding this line to the OnEnable method of the SF_Editor.cs script:
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

There might be a better way to fix this problem, but for me with the fix above, there hasn't been anymore problems.

Otherwise great software, very intuitive and powerful to use.

Errors on unity version 2018.1.0.f2

I am getting the error:
TypeLoadException: Could not load type 'UnityEngine.ProceduralMaterial' from assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. UnityEngine.ScriptableObject:CreateInstance() ShaderForge.SF_Editor:InitializeInstance(Shader) ShaderForge.SF_Editor:Init(Shader) ShaderForgeMaterialInspector:OnInspectorGUI() (at Assets/ShaderForge/Editor/InternalResources/Inspectors/ShaderForgeMaterialInspector.cs:85) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Whilst trying to open the editor

Does not work on macbook m1

Hi!) I bought myself a macbook pro 14 (m1 pro) and ShaderForge writes - "On older GPUs/iOS it was impossible to resolve AA and at the same time preserve AA-ed surface for future usage". I am on version 2022.1.2f1, how can this be solved?

Not working with 2020.2.4f1

I downloaded the ZIP, extracted the files, then dropped the folder into my Assets folder, which triggered an import. I receive an error stating that the XR settings file is corrupt or serialized with a newer version of Unity.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.