Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Declaring and reading frame buffer inputs in a shader?

Discussion in 'General Graphics' started by entity_NULL, Apr 1, 2021.

  1. entity_NULL

    entity_NULL

    Joined:
    Jan 28, 2020
    Posts:
    4
    I'm attempting to implement a basic deferred pipeline using SRP, and one of the roadblocks I'm running into is getting my deferred lighting shader to declare and read frame buffer inputs (the gbuffers). One of the examples I'm going off of is Felipe Lira's tutorial from 2018, which has a github repo here: https://github.com/phi-lira/SIGGRAPH2018-StudioWorkshop. I'm not copying it exactly, as I'm using (what I believe to be) the more up to date implementation of the render pass system (example here: https://docs.unity3d.com/2019.1/Doc....ScriptableRenderContext.BeginRenderPass.html)

    I'm getting an unrecognized identifier when attempting to use UNITY_DECALRE_FRAMEBUFFER_INPUT_FLOAT in my deferred lighting shader (example for which is here: https://github.com/phi-lira/SIGGRAP...master/Assets/Shaders/DeferredLighting.shader). I'm assuming this macro might be deprecated if I'm getting an error like that, so is there an equivalent one I should be using instead?

    Thanks in advance!