IPB

Welcome Guest ( Log In | Register )

69 Pages V  « < 20 21 22 23 24 > »   
Reply to this topicStart new topic
foo_wave_seekbar, pretty accelerated seekbar
Axon
post May 11 2010, 23:00
Post #526





Group: Members (Donating)
Posts: 1984
Joined: 4-January 04
From: Austin, TX
Member No.: 10933



Cheezy pixel-shader-magnifying-glass effects, anybody?

CODE
float4 evaluate(float2 tc, float2 d, float x0)
{
float xd=tc.x-x0,
y=(1/2-1),
u=-(2*xd/0.01)*(2*xd/0.01),
E=exp(u/2);

float4 minmaxrms = tex1Dbias(sTex, float4(
tc.x + xd*y*E,
0, 0,
log2(2048*d.x * (1 + y*E*(1+u)))
));

// alpha 1 indicates biased texture
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;
...


Zao, I've noticed when mucking around with LOD bias/mipmap levels that min/max levels are being averaged at lower LOD levels. As I understand the effect code, this isn't as much of a big deal with the default effect, because well, it completely ignores LOD and thus has massive aliasing issues of its own. But how possible do you think it would be to manually populate the mipmaps, by computing the max/min of the higher resolution texture samples, instead of letting DirectX average samples together?

And for the ultimate nitpick: Could you populate the .g value of minmaxrms with rms^2, so that sample averaging at lower LOD levels is meaningfully accurate?
Go to the top of the page
+Quote Post
Zao
post May 12 2010, 11:26
Post #527





Group: Members (Donating)
Posts: 884
Joined: 25-September 03
From: UmeŚ, Sweden
Member No.: 9001



I compute my own mipmaps. They are however just averaged as you noticed.
As for the default effect, as far as I know, sampling should pick a suitable miplevel according to size.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
Purple Monkey
post May 12 2010, 14:15
Post #528





Group: Members
Posts: 473
Joined: 25-June 05
Member No.: 22962



Getting to grips with HLSL a bit, after much math I realised that it should excel at vectors. An update to the seekbar.fx I posted in the CUI appearance thread.

To change the hue difference, change the number at 187,
CODE
c = hueshift(c,4.0);
If you want two particular hues, use the colour picker to find the hue values, subtract them and divide by 38.2.
Go to the top of the page
+Quote Post
Hitchhiker427
post May 13 2010, 08:15
Post #529





Group: Members
Posts: 232
Joined: 11-December 09
Member No.: 75848



QUOTE (Purple Monkey @ May 12 2010, 07:15) *
Getting to grips with HLSL a bit, after much math I realised that it should excel at vectors. An update to the seekbar.fx I posted in the CUI appearance thread.

To change the hue difference, change the number at 187,
CODE
c = hueshift(c,4.0);
If you want two particular hues, use the colour picker to find the hue values, subtract them and divide by 38.2.


I would like to make it so that my waveform is gray (or whatever the foreground color is), however, I want the played color to highlight it according to the selection color. I can sort of get the opposite of what I want if I change your effect to grayscale. Is there any easy way to modify it to get this effect? Thanks.
Go to the top of the page
+Quote Post
Purple Monkey
post May 13 2010, 14:14
Post #530





Group: Members
Posts: 473
Joined: 25-June 05
Member No.: 22962



On line 165 under the played function change:
CODE
    if (pos > tc.x)
to
CODE
    if (pos < tc.x)
Go to the top of the page
+Quote Post
teohhanhui
post May 13 2010, 21:02
Post #531





Group: Members
Posts: 34
Joined: 2-October 09
Member No.: 73639



seekbar.fx is not extracted when the file does not exist but the "effects" folder already exists in the profile folder.
Go to the top of the page
+Quote Post
Zao
post May 13 2010, 21:27
Post #532





Group: Members (Donating)
Posts: 884
Joined: 25-September 03
From: UmeŚ, Sweden
Member No.: 9001



That's not what my source code says, but in any way, it's largely moot.
The next version will not use files at all. I expect to release it in June or so.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
Dandruff
post May 14 2010, 00:06
Post #533





Group: Members
Posts: 491
Joined: 20-April 04
Member No.: 13618



QUOTE (Zao @ May 13 2010, 22:27) *
The next version will not use files at all.


Sounds nice! Thanks!
Go to the top of the page
+Quote Post
Anomalous
post May 14 2010, 04:31
Post #534





Group: Members
Posts: 105
Joined: 22-December 07
Member No.: 49766



Here's a version of the RMS effect which uses the highlight colour instead of just grey-scaling it. http://pastebin.com/rVfuCDgy

Go to the top of the page
+Quote Post
Hitchhiker427
post May 14 2010, 05:22
Post #535





Group: Members
Posts: 232
Joined: 11-December 09
Member No.: 75848



QUOTE (Purple Monkey @ May 13 2010, 07:14) *
On line 165 under the played function change:
CODE
    if (pos > tc.x)
to
CODE
    if (pos < tc.x)


Thanks. This was really obvious, I really should have noticed that.


So, I've been trying to play around with the seekbar.fx file, but I'm really not sure what does what in the code. First off, what language is this written in (and where can I find some basic documentation on the syntax)? Also, is there any form of documentation for this code specifically? I'm having a hard time trying to determine what each variable in the code corresponds to, and how to use them. Finally, is there any way to print a variable's value to the console for debugging? Thanks.
Go to the top of the page
+Quote Post
Anomalous
post May 14 2010, 05:51
Post #536





Group: Members
Posts: 105
Joined: 22-December 07
Member No.: 49766



From what I've read here it's High level shader language, there's documentation by Microsoft here.
Go to the top of the page
+Quote Post
Zao
post May 14 2010, 10:19
Post #537





Group: Members (Donating)
Posts: 884
Joined: 25-September 03
From: UmeŚ, Sweden
Member No.: 9001



Printing is something that is very hard to achieve in shaders.

One fundamental concept that tends to confuse people used to normal languages is that the PS function (pixel shader) runs on each and every pixel of the display, in parallel.
Thus, you can't really return anything or affect anything outside that pixel, like some mythical console or so.
I find that one of the easier ways to output values is to set the output colour component to values you're interested in and estimate the value based on that, with the caveat that only colour components between 0 and 1 are representable.

Documentation should be available on MSDN as Anomalous linked, and you ought to be able to find decent information on post-processing elsewhere online too.
After all, this is the language that shaders for most games are written in.

As for documentation on my functions, they should hopefully be reasonably obvious based on their usage and parameters. Heh.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
Hitchhiker427
post May 14 2010, 11:07
Post #538





Group: Members
Posts: 232
Joined: 11-December 09
Member No.: 75848



Thanks to both of you, that's helped a lot.
Go to the top of the page
+Quote Post
teohhanhui
post May 14 2010, 13:11
Post #539





Group: Members
Posts: 34
Joined: 2-October 09
Member No.: 73639



QUOTE (Anomalous @ May 14 2010, 11:31) *
Here's a version of the RMS effect which uses the highlight colour instead of just grey-scaling it. http://pastebin.com/rVfuCDgy

Thanks! That's exactly what I wanted but failed to achieve after trying for many hours...
Go to the top of the page
+Quote Post
IvoP123
post May 19 2010, 10:38
Post #540





Group: Members
Posts: 13
Joined: 22-February 10
Member No.: 78385



My seekbar doesn't highlight played part of the song. Is this a bug or is it something wrong with my foobar (i use it in ubuntu with wine)?
Go to the top of the page
+Quote Post
Quśrendo Invenie...
post May 24 2010, 18:06
Post #541





Group: Members
Posts: 3
Joined: 23-May 10
Member No.: 80848



Is there any feasible way to acquire Direct2D without having to install Vista SP2?
Go to the top of the page
+Quote Post
Zao
post May 24 2010, 18:28
Post #542





Group: Members (Donating)
Posts: 884
Joined: 25-September 03
From: UmeŚ, Sweden
Member No.: 9001



No. None whatsoever. You need SP2 and the platform update.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
Quśrendo Invenie...
post May 26 2010, 22:59
Post #543





Group: Members
Posts: 3
Joined: 23-May 10
Member No.: 80848



Ah, I see. After trying to install SP2 on my system at least seventeen times, and after finally installing the Platform Update, and after finally trying Direct 2D out, I have come to the conclusion that I prefer GDI over Direct 2D. At least I have the option to switch between the two now. (I still prefer Direct 2D over Direct 3D.)

Thanks for the component, Zao. It's easily amongst my favorites.
Go to the top of the page
+Quote Post
MDMA
post May 27 2010, 11:48
Post #544





Group: Members
Posts: 75
Joined: 23-May 10
Member No.: 80861



Anyone have any idea how I can pad the wave seekbar, so that there are a few more extra pixels of background around the wave? Thanks :-)
Go to the top of the page
+Quote Post
Zao
post May 27 2010, 15:11
Post #545





Group: Members (Donating)
Posts: 884
Joined: 25-September 03
From: UmeŚ, Sweden
Member No.: 9001



You can either scale down the texcoords somewhat, or fade to black when near the edge of the waveform, or something similarly sneaky.

That's all for the D3D one, of course. With GDI and D2D, you're out of luck.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
MDMA
post May 27 2010, 21:29
Post #546





Group: Members
Posts: 75
Joined: 23-May 10
Member No.: 80861



No idea how to do what you just said biggrin.gif Some further help may be necessary! and yes I am using D3D wink.gif
Go to the top of the page
+Quote Post
louiswain
post Jun 2 2010, 13:38
Post #547





Group: Members
Posts: 1
Joined: 2-June 10
Member No.: 81096



Hi
I'm trying to use your component but i cannot get it to work.
How can i activate the component so it appears in my foobar window?
I'm using winxp sp3 and i have an nforce4 gfx card, directx9 is installed too..
Please help. thank you!


update: already sorted out..
thanks for the neat plugin!


This post has been edited by louiswain: Jun 2 2010, 14:07
Go to the top of the page
+Quote Post
entsyymi
post Jun 5 2010, 17:46
Post #548





Group: Members
Posts: 1
Joined: 5-June 10
Member No.: 81213



Anyone have any idea why my seekbar goes like this at times:



It just stays still, doesn't react to anything, and I have no idea what causes it. Im using Windows 7 and the newest version of fb2k.
Go to the top of the page
+Quote Post
Zao
post Jun 5 2010, 23:04
Post #549





Group: Members (Donating)
Posts: 884
Joined: 25-September 03
From: UmeŚ, Sweden
Member No.: 9001



Not even clicking/dragging? Or resizing the element?
In other news, I'll be going home for summer, so I won't have any decent machine to develop on. After all my taunting of people who have GMA cards, now I have one of my own biggrin.gif


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
2E7AH
post Jun 6 2010, 08:20
Post #550





Group: Validating
Posts: 2424
Joined: 21-May 08
Member No.: 53675



I don't understand some of above talk, so hope not to repeat, but is it possible to script frequency range roughly in HSL space?

sine sweep:


some track:


I found this when looking for some command line spectrogram script here, which btw turned nice and fast for batch processing, and it also had option for generating such waveforms
Go to the top of the page
+Quote Post

69 Pages V  « < 20 21 22 23 24 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th April 2014 - 05:13