freyaholmer / shaderforge Goto Github PK
View Code? Open in Web Editor NEWA Shader Editor for Unity
A Shader Editor for Unity
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
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.
^^!
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?
GPU Instancing On DX11&DX12 failed.
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.
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.
GPU Instancing fails when Face Culling is set to Double Sided.
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.
When i use the dot product node with Nomalize mode. I see the generate code which first multiply 0.5 and then add 0.5. but no brackets generated. So when i multiply the dot result with other value, wrong result came out.
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
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!!
Hi Holmer! Trying to figure out if there's a way of loading custom data or custom vertex streams within shader forge!
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.