ibicha / imageeffectgraph Goto Github PK
View Code? Open in Web Editor NEWImage effects for post processing stack created with shader graph for Unity
License: MIT License
Image effects for post processing stack created with shader graph for Unity
License: MIT License
"PreviewType"="Plane" in the subshader generator
It is currently possible to use the created effects directly on the camera (aka using OnRenderImage), without the need for the postprocessing stack.
For this, two things needs to be done:
generatePropertyBlock = false
To:
generatePropertyBlock = true
For some reason, the postprocessing stack only works with false
, and OnRenderImage
only works with true
.
#ifndef UNITY_POST_PROCESSING_STACK_V2
//#define UNITY_POST_PROCESSING_STACK_V2 // comment this line to use without postprocessing stack
#endif // UNITY_POST_PROCESSING_STACK_V2
This keyword is supposed to be passed from script, so the shader compiler knows what to compile (postprocessing stack vs legacy effect) but due to keyword count limit to 256, this might fail.
Finally, open the shaders in shader graph and save again (this should happen automatically if you edit the legacyEffectPass.template
file, so do this in case it doesn't). The effects should be working WITHOUT the postprocessing stack using this script.
Previews in the shader graph nodes are completely broken hacky, dirty and unreliable.
Currently they rely on a global texture _PreviewTexture
set by the custom effect.
The shader graph gui needs to be capable of capturing the game view before effects reliably, so the graph is capable of showing the transformation of the original texture into the destination master.
Need ideas on the best way to implement this (the current way can be improved to be honest)
Make into a package available to the package manager
New nodes introduced in this repo need to have documentations added to each class.
In 2018.3.0b7 added support for git package dependencies from package manager :
https://forum.unity.com/threads/git-support-on-package-manager.573673/
Here is the guide to make a custom package:
https://gist.github.com/LotteMakesStuff/6e02e0ea303030517a071a1c81eb016e
Do you think this is a good idea to support it ? If so, i could try to make a PR.
Post processing profile prevents from adding the same effect more than once.
Even when using hacks, and successfully adding more than one effect of the same type, the renderer will only render one of them not both. This is needs to be updated in the post processing stack side.
As a work around, for each additional effect you want to use:
RenderWithMaterial
like so:using System;
using ImageEffectGraph.PostProcessing;
using UnityEngine.Rendering.PostProcessing;
namespace ImageEffectGraph.Demo
{
[Serializable]
[PostProcess(typeof(RenderWithMaterialRenderer), PostProcessEvent.AfterStack, "Custom/My Other Effect")]
public class MyOtherEffect : RenderWithMaterial
{
}
}
RenderWithMaterialEditor
like so:using ImageEffectGraph.Demo;
using ImageEffectGraph.Editor.PostProcessing;
using UnityEditor.Rendering.PostProcessing;
namespace ImageEffectGraph.Editor.Demo
{
[PostProcessEditor(typeof(MyOtherEffect))]
public class MyOtherEffectEditor : RenderWithMaterialEditor
{
}
}
And now you should be able to add the new effect from the editor:
These are included in the repository for the sake of the example, until this is permanently fixed.
Unity Version: 2018.3.0b9
When try to connect a multiply node and multiply Maintexture output with color node then assign it image effect node, it doesnt work and become one of "not compiled shaders". Middle of screen became pink with a triangle. (There is a cube over there.) Error like this:
Screenshots as follows:
The subshaders generators (all 3 of them) are pretty much a hacky copy paste from the unlit shader of LWRP.
Probably need a rewrite, to reflect shader features of different pipelines.
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.