Can GSDX use multi-pass shaders ?
#11
gamma pre-pass. just another buzzword. and it does multipass. it just does that per pixel not per screen. all in one shader. one could even rewrite the shader generator and load multiple "pass" shaders and link them at runtime to just be one multipass pixel shader. it's just how it's done these days. retroarch is using the old style.
Reply

Sponsored links

#12
(05-25-2014, 10:28 PM)dabore Wrote: gamma pre-pass. just another buzzword. and it does multipass. it just does that per pixel not per screen. all in one shader. one could even rewrite the shader generator and load multiple "pass" shaders and link them at runtime to just be one multipass pixel shader. it's just how it's done these days. retroarch is using the old style.

So basically it cant use multiple shaders at the same time but can combine multiple shaders into more complex shaders ?
Reply
#13
Unless it has changed, the post processing implementation is a single pass. Passes, as in the execution of a shader program. Multiple passes, being the execution of multiple shader programs for the... effect? meh.

For example, a two pass gaussian blur would take n + n samples. In one pass, you do the horizontal blur and in another pass the vertical blur. In a single pass, you would do n x n samples for the same effect.

So you can consider it a single effect "blur", but one method uses a single pass or step and the other one uses two passes.
[Image: nbKSK.jpg]
Reply
#14
(05-25-2014, 10:46 PM)KrossX Wrote: Unless it has changed, the post processing implementation is a single pass. Passes, as in the execution of a shader program. Multiple passes, being the execution of multiple shader programs for the... effect? meh.

For example, a two pass gaussian blur would take n + n samples. In one pass, you do the horizontal blur and in another pass the vertical blur. In a single pass, you would do n x n samples for the same effect.

So you can consider it a single effect "blur", but one method uses a single pass or step and the other one uses two passes.

So its limited to single-pass as I suspected but can it use some kind of pre-passes ?
Reply
#15
Again, unless it has changed... nope. Just a single shader is loaded and applied on the final render.

Maybe you're confusing the "things the shader might be doing" as opposed to "how many shaders are being applied". It certainly gets confusing.
[Image: nbKSK.jpg]
Reply
#16
(05-25-2014, 11:08 PM)KrossX Wrote: Again, unless it has changed... nope. Just a single shader is loaded and applied on the final render.

Maybe you're confusing the "things the shader might be doing" as opposed to "how many shaders are being applied". It certainly gets confusing.

I am asking because I heard Asmodeans shaders have gamma prepass.
Reply
#17
what if it has gamma prepass. it's just a function that reads a color and modifies a color. for the pass and shader count and not pass confusion. let's do it more explicit. factually. textually. one can do it like this:

gamma prepass.fxc:
Code:
shader blah
color gammaprepass(){
    more shaderblah
}

horizontal blur.fxc:
Code:
shader blah
color horizontalblur(){
    more shaderblah
}

vertical blur.fxc:
Code:
shader blah
color verticalblur(){
    more shaderblah
}

contrast.fxc:
Code:
shader blah
color contrast(){
    more shaderblah
}

BUT... it is the exactly the same as gsdx's

fxshader.fxc:
Code:
shader blah
color gammaprepass(){
    more shaderblah
}
color vericalblur(){
    more shaderblah
}
color horizontalblur(){
    more shaderblah
}
color  contrast(){
    more shaderblah
}

color fxshader(){
    gammaprepass();
    horizontalblur();
    verticalblur();
    contrast();
}

just now it's one big shader instead the smaller ones. it still does all the passes aka that functions. you GET IT NOW ?!? Smile
Reply
#18
(05-25-2014, 11:10 PM)Monochrome100 Wrote: I am asking because I heard Asmodeans shaders have gamma prepass.

Asmodean's shader, is a single shader. A pretty big shader at that. Gamma correction is just one of the many things the shader can do, but it's still a single shader.

The "passes" on that shader are part of the "things that happen in the shader", not in how the rendering is implemented. Again it's still a single shader.

It's a pain in the butt to mix them many effects in a single shader and be efficient about it. So you better give him some +'s.
[Image: nbKSK.jpg]
Reply
#19
(05-25-2014, 11:23 PM)KrossX Wrote: Asmodean's shader, is a single shader. A pretty big shader at that. Gamma correction is just one of the many things the shader can do, but it's still a single shader.

The "passes" on that shader are part of the "things that happen in the shader", not in how the rendering is implemented. Again it's still a single shader.

It's a pain in the butt to mix them many effects in a single shader and be efficient about it. So you better give him some +'s.

Thanks for responses so basically GSDX is limited to single-pass but Asmodeans shaders are complex so they have effects of multiple simpler shaders in one shader.
Reply
#20
(05-25-2014, 11:23 PM)KrossX Wrote: It's a pain in the butt to mix them many effects in a single shader and be efficient about it.

How come?

I think this should be just some kind of composition (mathematics) of shader functions, or? if you now use shaders s1,s2,s3 with one effect per shader in a way that you get a Multiple shader:

Code:
output = s1(s2(s3(input)));


there is no difference to one single shader ss with multiple effects

Code:
ss(input)
{
return effect1(effect2(effect3(input)))
}
output = ss(input);

Am I missing something? The first example seems to be better encapsulated and maybe easier to configure for the enduser. But in the end they are the same.
Reply




Users browsing this thread: 1 Guest(s)