Skip to content

Commit

Permalink
Added VFX graph support, and bumped version up to 1.0.0 since everyth…
Browse files Browse the repository at this point in the history
…ing is implemented.
  • Loading branch information
Zallist committed May 16, 2022
1 parent 55462aa commit cf83c8f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#if HAS_VFX_GRAPH
using UnityEngine;
using UnityEngine.Rendering;

namespace UnityEditor.Rendering.Universal
{
internal class VFXShaderGraphSimpleLitGUI : ShaderGraphSimpleLitGUI
{
protected override uint materialFilter => uint.MaxValue & ~(uint)Expandable.SurfaceInputs;
}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public override void Setup(ref TargetSetupContext context)
var gui = typeof(ShaderGraphSimpleLitGUI);
#if HAS_VFX_GRAPH
if (TargetsVFX())
gui = typeof(VFXShaderGraphLitGUI);
gui = typeof(VFXShaderGraphSimpleLitGUI);
#endif
context.AddCustomEditorForRenderPipeline(gui.FullName, universalRPType);
}
Expand Down
7 changes: 2 additions & 5 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This plugin simply adds a Simple Lit material (SubTarget) to the Universal targe
If Unity ever implements the Simple Lit master node themselves, it should be an in-place replacement for this. To the point where you'll likely even get code conflicts.

## Dependencies
* Should work on Unity version 2021.2 or higher, with URP version 12 or higher
* Works on Unity version 2021.2 or higher, with URP version 12 or higher

## How to install
* Go to Package Manager in Unity
Expand All @@ -15,7 +15,4 @@ If Unity ever implements the Simple Lit master node themselves, it should be an
Once it's been installed, it should simply be a matter of just making a Shader Graph (there's an option in the Asset Creation menu for SIMPLE LIT SHADERGRAPH, near LIT SHADERGRAPH) and choosing the Material "Simple Lit". Basically the same way you'd make a Lit or Unlit shadergraph, instead just choose Simple Lit.

### Example
![Shader Graph](https://i.imgur.com/r4LI0g5.png)

## Known issues
* VFX modifications have not been made, but should just be a missing GUI that needs to be created
![Shader Graph](https://i.imgur.com/r4LI0g5.png)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.zallist.universal-shadergraph-extensions",
"displayName": "Universal Shader Graph Extensions",
"version": "0.0.5",
"version": "1.0.0",
"documentationUrl": "https://github.com/zallist/UnityShaderGraphExtensions",
"licensesUrl": "https://github.com/Zallist/unity-universal-shadergraph-extensions/blob/main/LICENSE",
"description": "This plugin simply adds a Simple Lit material (SubTarget) to the Universal target for Shader Graph"
Expand Down

0 comments on commit cf83c8f

Please sign in to comment.