|
From: merspieler <mer...@ai...> - 2020-09-13 00:43:50
|
On Sun, Sep 13, 2020 at 01:01:36AM +0200, Fernando García Liñán wrote: > On Sat, Sep 12, 2020 at 6:22 PM merspieler <mer...@ai...> wrote: > > That's exactly the issue... I've got no clue, where and how to call > > that shader. > > Depends on what you want to do. If you want to do a post processing > effect on a shader, i.e. you need to access the final render, you have > to use a 'quad' pass with a <effect> tag. You render the scene to a > cubemap on a 'scene' pass using <cubemap-face>, and then you pass the > cubemap texture to the 'quad' pass I just mentioned. If this sounds > confusing, you should probably get familiar with how this is done on > pure OpenGL/Vulkan/DirectX first. The Compositor is just an > abstraction to make common rendering techniques easier to implement > and debug. I'm not even that far. Where do I see, what is done in a pass when there's no effect tag used? In neither of the two ALS passes I can see any effect tags... So where are shaders etc. defined from? ... I kinda feel like we're talking past each other. You are a couple steps ahead of me. I've still got to understand the compositor, before looking into shaders or effects or what ever. Let me give an example. There's the cliffs.frag shader in fgdata/Compositor/Shaders/ALS/cliffs.frag Where is it defined, that this shader should or shouldn't be used by a given pipeline? > My suggestion would be to make some kind of graph or flow diagram of > the required rendering steps to accomplish what you need. I'm > imagining something like this: > https://learnopengl.com/img/advanced-lighting/ssao_overview.png > I should then be able to guide you on how to implement such a pipeline > with the Compositor. I'd say, first for my own understanding, just get one of the cubemap faces rendered to screen. Once I understand that, it would be like... Normal ALS render but to cubemap -> project from the cubemap to screen. I'd guess that this has to be some sort of shader. The values of the cubemap can be accessed by a vec3 so I'd probably need to write a function that looks up the texel on the cubemap based on the screen pixel. But still... first I need to understand where those shaders are called, when not done in the effect tag. |