SmartShader Question and maybe a bit of help

I was wondering if it would be possible to write a smartshader that would give this effect?

Shader.jpg


It is a sort of saturatrd colour effect. Could any one help or if possible write the shader for me as I am a bit of a dunce when it comes to this type of thing. I have tried to write one but I am failing dismally as I have no idea about syntax or things like this.

Help please?

SD
 
To me the effect looks more like a decrease in colour saturation and the addition of a blur filter. Check this out:

Original shot
New shot

I just used Irfanview to decrease the saturation by around 100 points (by Irfanfiew's measurement) and then applied a maxed out blur filter.
 
It's not hard to write, unfortunately i have no time to do it for you, at least for the upcoming days.

Btw all the needed coding should already be inside the ATI smarthshaders source code. It would me more of a cut and paste, it the effect you needed it's just what Ostsol showed
 
I wrote a shader to do colour saturation and I got @$#!ed off at a site and nuked it. So it can be done. Blurring can also be done go search for NV40 AA emulation on rage3d :)
 
ATI has a RenderMonkey workspace that deals with saturation. I think it's a two pass render and that goes through the process of converting RGB data to HSI, ramping the saturation, and then converting the result back to RGB. I was thinking the same thing could be done quicker using lookup tables stored in volume textures. The only problem is that two 256x256x256 RGB volume textures take up 96 MB of memory. I suppose that some accuracy could be compromised and 128x128x128 textures could be used, bringing the total down to 12 MB, though. . .
 
Ostsol said:
ATI has a RenderMonkey workspace that deals with saturation. I think it's a two pass render and that goes through the process of converting RGB data to HSI, ramping the saturation, and then converting the result back to RGB. I was thinking the same thing could be done quicker using lookup tables stored in volume textures. The only problem is that two 256x256x256 RGB volume textures take up 96 MB of memory. I suppose that some accuracy could be compromised and 128x128x128 textures could be used, bringing the total down to 12 MB, though. . .

Theirs that and also the fact you can't load 3d textures in the smartshaders.
 
When you only want to decrease saturation
color + (vec3(max(r,g,b)) - color) * X
should do the job (X=0.3 or so, color being a vec3, too).
It effectively decreases the difference between the channel with the highest value and the other channels.

In even more simple terms
color = lerp(color, max(color.r, color.g, color.b), X)
 
Thanks for the the repies fellas.
As I said I am a complete numpty when it comes to this type of stuff.

@Ostsol. That is the type of effect I am looking for, although maybe not quite so blurred.

@ NocturnDragon. I am in no rush. If you do get around to trying to do this I would be extremely grateful. One thing I would ask for though is if you could please comment the code so I know which bit of code does what, for future reference. It probably is a simple thing to do for you but to me it is kind of like milking a gnat :)
Once again if you do try this could you please email it to me?

the_soupdragon(at)btinernet(dot)com

I am using ATI's Shader control software to impliment them as I have a Radeon 9700 pro, if that is relevent to you.

@XMAS. I have no idea what you just posted means LOL :oops:

@KELRaTH. LOL :LOL: The clangers whistle I just growl and guard the soup :)

SD
 
Ostsol said:
To me the effect looks more like a decrease in colour saturation and the addition of a blur filter. Check this out:

Original shot
New shot

I just used Irfanview to decrease the saturation by around 100 points (by Irfanfiew's measurement) and then applied a maxed out blur filter.

<looks dazed and confused>That is a R420 Vs NV40 comparison isn't it?</looks dazed and confused> :LOL:
note that I haven't said which is which.
 
the _soupdragon said:
@XMAS. I have no idea what you just posted means LOL :oops:

Give up now LOL Smart shaders are implemented in ARB_FP1.0 assembly and if you can't understand the code in a High Level language then your in trouble.
 
Ostsol said:
ATI has a RenderMonkey workspace that deals with saturation. I think it's a two pass render and that goes through the process of converting RGB data to HSI, ramping the saturation, and then converting the result back to RGB.

Written by me. :)
[/pride]

Indeed, it converts from RGB to HSI, then performs an individual scale and bias operation on all HSI components according to the sliders. Saturation and Intensity is clamped to [0, 1] while hue is wrapped around (makes more sense than clamp since hue is an angle in HSI space). Then it converts back to RGB. I tried fitting it into a single pass, but it was too long. The X800 should be able to do it in a single pass though.

Ostsol said:
I was thinking the same thing could be done quicker using lookup tables stored in volume textures. The only problem is that two 256x256x256 RGB volume textures take up 96 MB of memory. I suppose that some accuracy could be compromised and 128x128x128 textures could be used, bringing the total down to 12 MB, though. . .

I made a version that did it that way too, though it seems that one didn't make it into the official RenderMonkey release. In fact, this method is preferrable. It's faster and simpler. Also, the volumes need not be large. I saw almost no difference compared to the full math version with 32x32x32 textures. So that's just 128kb.
 
Humus said:
I made a version that did it that way too, though it seems that one didn't make it into the official RenderMonkey release. In fact, this method is preferrable. It's faster and simpler. Also, the volumes need not be large. I saw almost no difference compared to the full math version with 32x32x32 textures. So that's just 128kb.
It'd be cool to see a SmartShader for this. We could call it: Digital Vibrance. ;) :LOL:
 
Ostsol said:
Humus said:
I made a version that did it that way too, though it seems that one didn't make it into the official RenderMonkey release. In fact, this method is preferrable. It's faster and simpler. Also, the volumes need not be large. I saw almost no difference compared to the full math version with 32x32x32 textures. So that's just 128kb.
It'd be cool to see a SmartShader for this. We could call it: Digital Vibrance. ;) :LOL:

Well you can't do it with volumeteric textures I did a one pass Digital Viberance a while ago ( was HSL or HSV or one of those other ones they are all good enough for DV ). ( like 50 odd instructions ) Killed like 50% of the speed.

dv.jpg

nodv.jpg
[/img]
 
Back
Top