Giter Site home page Giter Site logo

imageeffectgraph's People

Contributors

edwin0cheng avatar edwin0minv avatar ibicha 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

imageeffectgraph's Issues

[TIP] Legacy effects (without Postprocessing Stack)

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:

  1. Step 1: Property blocks needs to be generated. simply change this line here from:
generatePropertyBlock = false

To:

generatePropertyBlock = true

For some reason, the postprocessing stack only works with false, and OnRenderImage only works with true.

  1. Step 2: Comment out this line:
#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.

2019.1 support ?

Right now, it appears to be tool is not compatible with Unity 2019.1+ due to changes that they've made. I'm getting errors like this:

image

Better previews in shader graph

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)

Packaging

Make into a package available to the package manager

Node documentation

New nodes introduced in this repo need to have documentations added to each class.

Can't use multiple effects at once

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:

  1. Create a class that inherits from 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
    {
    }
}
  1. Create an editor (inspector) for that class that inherits from 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:

screen shot 2018-12-08 at 10 30 07 am

These are included in the repository for the sake of the example, until this is permanently fixed.

Multiply node breaks the graph

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:

image

Screenshots as follows:

image

image

SubShader generation cleanup

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.

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.