FreyaHolmer / ShaderForge

A Shader Editor for Unity
2.64k stars 529 forks source link

Errors on unity version 2018.1.0.f2 #1

Closed JamesTompkins closed 4 years ago

JamesTompkins commented 6 years ago

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

ErikBehar commented 6 years ago

This is due to Unity removing Substance in 2018.

If you need SF to work in 2018, here is my 2018 working branch... https://github.com/ErikBehar/ShaderForge/tree/u2018 ... HOWEVER, there is a Unity issue that basically makes most of the shaders you make not completely work in 2018.1.0f2 : https://issuetracker.unity3d.com/issues/using-forward-add-shadow-rendering-mode-produces-irrelevant-syntax-error

@FreyaHolmer should we make a branch for 2018 in your repo or attempt to

if !UNITY_2018_OR_NEWER all the changes as I've started to do on my branch ? Or maybe someone suggest a better way to handle it ?

JamesTompkins commented 6 years ago

I tried fixing myself but the errors pointed to the DLL file which I'm not versed in. What version would you suggest to downgrade to to use it?

ErikBehar commented 6 years ago

If you are using source code then I suggest you delete the .dll . If you want to use Shader Forge in 2018 use my branch for now, if you want to be able to compile in 2018 then you will need a version mentioned in the Issue Tracker: 2018.2.0a5 and above. I can update here if they back port the fix.

JamesTompkins commented 6 years ago

Thank you both for the help

pharan commented 6 years ago

If @FreyaHolmer can't maintain the project anymore, are we just not going to have a central repo for a while? (meaning no PRs to this repo to fix stuff?)

ErikBehar commented 6 years ago

@pharan I spoke with @FreyaHolmer on the unitydevs slack, I think the goal is to lightly maintain this repo, the suggestion was to make a 2017 and earlier branch and then maintain master on latest release. I think you may submit PR's and @FreyaHolmer will get to them eventually.

celeronpm commented 6 years ago

I'm also seeing issues with LIGHT_ATTENUATION. Any fixed to use UNITY_LIGHT_ATTENUATION instead on 2018?

ErikBehar commented 6 years ago

@celeronpm https://github.com/Invertex/ShaderForge/commit/9120322ccc917ce5a96e38f05ca22cce27f3d81b

pedro15 commented 6 years ago

As i know Shaders made in unity before 2018.x will not work on SRP. the shader model changed in 2018.x i stick with 2017.3 and i'm waiting to unity's shadergraph gets the same level of shaderforge

ErikBehar commented 6 years ago

@pedro15 Although there are SRP's in 2018, it is not required to use them, you may use the current "Standard/Generic/Non Scriptable" Render pipeline in 2018.x, all shaders and SF should work pretty much exactly the same in 2018. My thought is we as a community could possibly create a base shader node to add to SF for Lightweight SRP and High-DEF SRP too. BTW updates here like the LIGHT_ATTENUATION bug are also good for later versions of 2017.

pedro15 commented 6 years ago

@ErikBehar Is not very easy to port ShaderForge to SRP. many things changed... See is thread that i've made in the shadergraph repository: https://github.com/Unity-Technologies/ShaderGraph/issues/364

that is only for some of the missing nodes

ErikBehar commented 6 years ago

@pedro15 I think the way SF mocked the Unity Standard shader with SF PBR shader is a good way of thinking about it, ie PBR SF shader != Standard shader, but it's close enough. So basically looking at the final shader result for a normal SRP shader and creating a main node that comes close directly in vert frag shader following the requirements for that SRP. I'm not a shader wiz, but I think it can be done.

pedro15 commented 6 years ago

Yeah, it can be done but for example for getting the lighting data in SRP is not very simple. but yeah, i hope the community sometime figure out how to make shader forge work with SRP. :)

frideal commented 6 years ago

Does ShaderForge will Update any More?

FreyaHolmer commented 6 years ago

I'll probably not update it anymore no. It's at least not currently planned. It might happen in the future, but don't count on it :)

darkhog commented 5 years ago

I'll probably not update it anymore no. It's at least not currently planned. It might happen in the future, but don't count on it :)

How about accepting pull requests though? Wouldn't require you to actively work on it, just check once in a month or so and accept all reasonable PRs, such as those that makes it compatible with newer versions of Unity.

xiangyuan commented 5 years ago

unity 2018 3 f2 fresnel not work @ErikBehar

ErikBehar commented 5 years ago

@xiangyuan could you provide more information, is there an error log, does it only not work with that version, does it work with previous, what are the symptoms?

xiangyuan commented 5 years ago

@xiangyuan could you provide more information, is there an error log, does it only not work with that version, does it work with previous, what are the symptoms?

sorry for response too late some mistake by myself, it work perfect on 2018

FreyaHolmer commented 4 years ago

This has now been fixed! Although it's primarily for 2019 support rather than 2018 support :) Hope it helps!