Luper
December 19, 2015, 12:18pm
1
Playing with music visualization here, did this really simple DX11.TextureFX that copy center line on right and left, till the focus is on the patch it works great:
https://vvvv.org/sites/default/files/imagecache/large/images/120fps.png
but as soon as I focus on other windows, or even on the desktop, the performance (and also the visual result!) fall down in a terrible way
https://vvvv.org/sites/default/files/imagecache/large/images/30fps.png
any idea why?
https://vvvv.org/sites/default/files/imagecache/large/images/HorizzDiffHelp_2015.12.19-12.11.58.png
here you got the patch and the “HorizzDiffuse.tfx”
HorizzDiff.rar (527.0 kB)
yea, u need to change background FPS, add a MainLoop
Luper
December 19, 2015, 12:25pm
3
ah ok, I need to sett the mainLoop maximum background fps, thanks antokio!
Luper
December 19, 2015, 1:12pm
4
But, its really simple patch, now that it come in my mind… it isn’t enough 30 fps to have it work properly? perhaps the tfx is poor written?
Can someone have a look, please?
Texture2D tex0: PREVIOUS;
Texture2D tex1 <string uiname="Texture In 2";>;
SamplerState s0 <bool visible=false;string uiname="Sampler";> {Filter=MIN_MAG_MIP_LINEAR;AddressU=CLAMP;AddressV=CLAMP;};
float2 R:TARGETSIZE;
cbuffer controls:register(b0){
float Delta <float uimin=0.0; float uimax=1.0;> = 0.5;
};
float4 pSlideHorizontal(float4 PosWVP:SV_POSITION,float2 uv:TEXCOORD0):SV_Target{
if ( (uv.x<.5+Delta/2) && (uv.x>.5-Delta/2) ){
//uv.x += Delta;
return tex0.SampleLevel(s0, uv, 0);
} else {
if (uv.x<(.5-Delta/2)) {
uv.x += Delta;
return tex1.SampleLevel(s0, uv, 0);
} else {
uv.x -= Delta;
return tex1.SampleLevel(s0, uv, 0);
}
}
}
id144
December 19, 2015, 11:02pm
5
There is no performance bummer in your patch and shader. I managed to run it even 500fps on a laptop with gtx765m.