[Lights, Camera, Action]

Home    Forums    Tutorials    Search    Books    Links 

Windows Movie Maker tips, tutorials, forums and more...



 
Windows Movie Maker Home   Search   Login   Register   Member List  
Movie Maker Users Showcase  > Share Your Vista Transitions and Effects!!  > Gamma Adjustments Effect    
Previous Thread :: Next Thread 
 Author Thread: Gamma Adjustments Effect
aar2697 is not online. Last active: 6/29/2010 3:04:16 AM aar2697
www.freewebs.com
Top 50 Poster
Joined: 14 Mar 2007
Total Posts: 362
 
Gamma Adjustments Effect
Posted: 22 Jun 2008 09:54 PM
Now because of me and Blaine, we have FULL color customization! What I mean by that is that Windows Movie Maker has RGB and brightness. I have the Gamma, and Blaine has Contrast. But my big thanks is to Blaine for the FX file. What I did was changed every part that says "Contrast" to "Gamma". And removed all of the "Blaine's World" stuff.
_______________________________________________________

The following code is corrected in a later post... please read on.

FX File (Save To C:\Program Files\Movie Maker\Shared)

#include "common.fxh"

float fGamma: Gamma;

float4 PS_Gamma( float2 f2TexCoord : TEXCOORD0 ) : COLOR0 {
float4 f4TexColor = tex2D(PointSampler, f2TexCoord);
return (f4TexColor-0.5)*fGamma+0.5;
}

technique Gamma
{
pass P0
{
VertexShader = compile vs_2_0 VS_Basic();
PixelShader = compile ps_2_0 PS_Gamma();
}
}


XML File (Save to C:\Program Files\Movie Maker\Shared\AddOnTFX)

<TransitionsAndEffects Version="2.8">
<Effects>
<EffectDLL guid="TFX">
<Effect name="Gamma 50%" iconid="1" guid="Gamma 50%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="Gamma.fx" />
<Param name="Technique" value="Gamma" />
<Semantics>
<Gamma type="float" value="0.50" />
</Semantics>
</Effect>
</EffectDLL>
</Effects>
</TransitionsAndEffects>


To customize:
Change the value of the 9th line of the xml to whatever.

Tip: Negative Values Produce More Vivid Colors


20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design
TheOnePb is not online. Last active: 4/3/2010 8:23:13 AM TheOnePb
youtube.com
Top 50 Poster
Joined: 15 Nov 2007
Total Posts: 520
 
Re: Gamma Adjustments Effect
Posted: 23 Jun 2008 03:18 AM
Hi Aar267 & others,

I hope you think it's okay if I post some effects made of this one!

You need DPL_Gamma_Effect.fx for these effects! Check post DOWN!!!

For more effects, check post by Patrick L. and take that .fx file and my new xml 1 post under that!


TheOnePb

Movie Maker 6.0 on Windows 7 + ShaderTFX, registeredSmiley
http://youtube.com/profile?user=TheOnePb1
aar2697 is not online. Last active: 6/29/2010 3:04:16 AM aar2697
www.freewebs.com
Top 50 Poster
Joined: 14 Mar 2007
Total Posts: 362
 
Re: Gamma Adjustments Effect
Posted: 23 Jun 2008 11:01 AM
Thanks for helping!

20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design
aar2697 is not online. Last active: 6/29/2010 3:04:16 AM aar2697
www.freewebs.com
Top 50 Poster
Joined: 14 Mar 2007
Total Posts: 362
 
Re: Gamma Adjustments Effect
Posted: 23 Jun 2008 12:05 PM
UPDATE!!!
The normal Gamma Level is equivalent to 1.

20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design
aar2697 is not online. Last active: 6/29/2010 3:04:16 AM aar2697
www.freewebs.com
Top 50 Poster
Joined: 14 Mar 2007
Total Posts: 362
 
Re: Gamma Adjustments Effect
Posted: 23 Jun 2008 12:49 PM
Tip 2: Values Above 1 also produce vivid, but not blue colors.

20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design
Rehan is not online. Last active: 5/8/2012 5:49:17 PM Rehan
www.rehanfx.org
Top 25 Poster
Joined: 21 Apr 2004
Total Posts: 2176
 
Re: Gamma Adjustments Effect
Posted: 24 Jun 2008 05:19 PM
Hi Josh

Its a good attempt however what you have changed in the .fx file is not sufficient to produce gamma correction effects... changing the name does not change the functionality... so the code is still adjusting contrast..

For Gamma Adjustment please study how gamma is calculated and then implement the formula in the .fx file. Please let me know if you need any help.

www.rehanfx.org - do more with Windows Movie Maker...
rehanfx.x10hosting.com - mirror site
aar2697 is not online. Last active: 6/29/2010 3:04:16 AM aar2697
www.freewebs.com
Top 50 Poster
Joined: 14 Mar 2007
Total Posts: 362
 
Re: Gamma Adjustments Effect
Posted: 24 Jun 2008 07:38 PM
Oh, I didn't realise. I thought it was gamma i was adjusting. But currently I am focussing on trying to study more about FX. I don't know any sites to study from. Do you have any suggestions?

20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design
Rehan is not online. Last active: 5/8/2012 5:49:17 PM Rehan
www.rehanfx.org
Top 25 Poster
Joined: 21 Apr 2004
Total Posts: 2176
 
Re: Gamma Adjustments Effect
Posted: 24 Jun 2008 07:59 PM
Here is a tutorial: HLSL (Pixel shader) effects tutorial.

The best way to learn it is to try tweaking some .fx files and seeing how it affects output.

www.rehanfx.org - do more with Windows Movie Maker...
rehanfx.x10hosting.com - mirror site
aar2697 is not online. Last active: 6/29/2010 3:04:16 AM aar2697
www.freewebs.com
Top 50 Poster
Joined: 14 Mar 2007
Total Posts: 362
 
Re: Gamma Adjustments Effect
Posted: 24 Jun 2008 08:31 PM
Wow, thanks rehan! Now I actually know what to look up when I search, and more about basic pixel shaders. I'll looking more through fx and maybe I'll release something soon if possible.

20" iMac
2.4 GHz Intel Core 2 Duo Processor
1 GB RAM (To be upgraded..)
250 GB Hard Drive 7200RPM
Firewire 400 and 800
4 USBs
Beautiful Design
PatrickL is not online. Last active: 12/4/2015 6:48:13 PM PatrickL
pleabo.home.comcast.net
Top 25 Poster
Joined: 31 Jul 2005
Total Posts: 1305
 
Re: Gamma Adjustments Effect
Posted: 03 Jul 2008 10:41 AM
Josh and Pb you might try this. It seems to match about what IrfanView does with Gamma Correction and also Rehan's reference (I think).

The FX file:

// Save as DPL_Gamma_Effect.fx to Shared Folder
#include "common.fxh"

//Global semantics for Gamma Effect
shared float gamma : Gamma = 1.0;

////////////////////////////////////////////////////////////////////////////////
// Pixel Shader For Gamma Effect
float4 PS_Gamma(float2 t : TEXCOORD0) : COLOR {
float4 lgamma=1.0/gamma; // Inverse ala' graphic editors
lgamma.a = 1.0;
return saturate(pow(tex2D(PointSampler, t),lgamma)); // Not sure if saturate needed?
}

////////////////////////////////////////////////////////////////////////////////
// Gamma Effect Technique
technique GammaEffect {
pass P0 {
VertexShader = compile vs_2_0 VS_Basic();
PixelShader = compile ps_2_0 PS_Gamma();
}
}


and an XML file:

<!-- ************* Save as DPL_Gamma_Effect.xml to AddOnTFX folder************* -->
<TransitionsAndEffects Version="2.8" >
<Effects>
<EffectDLL guid="TFX">

<Effect name="DPL Gamma 1.5" iconid="3" guid="DPL Gamma 1.5" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="1.5" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 0.667" iconid="2" guid="DPL Gamma 0.667" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="0.667" />
</Semantics>
</Effect>

</EffectDLL>
</Effects>
</TransitionsAndEffects>


You can change the Gamma in the
<Gamma type="float" value="0.667" />
statement. Make Gamma >0.0. Gamma=1.0 is no change, <1.0 is darken and >1.0 is lighten.

The Icons used are the Movie Maker ones provided for Brightness, Decrease and Brightness, Increase even though the HLSL for them is more like Josh's above.

See Video Sample.

Have Fun, PatrickL

DPL Freeware Effects and Transitions for Vista MM Website
TheOnePb is not online. Last active: 4/3/2010 8:23:13 AM TheOnePb
youtube.com
Top 50 Poster
Joined: 15 Nov 2007
Total Posts: 520
 
Re: Gamma Adjustments Effect
Posted: 03 Jul 2008 03:05 PM
Thanks Patrick L.! Great effect, works fine!
My (new) extra effects:
You need DPL_Gamma_Effect.fx (above) for these effects to work. Save this XML to DPL_Gamma_Effect.xml in AddOnTFX!.

<!-- This XML for Windows Moviemaker 6.0 Vista installs 27 additional Gamma effects for you.
This XML is made by TheOnePb. Please use this webpage with sharing:
http://www.windowsmoviemakers.net/Forums/ShowPost.aspx?PostID=175441
Please share your additional effects on http://www.windowsmoviemakers.net/Forums/
Happy editing! [Last update 08/2008] -->

<TransitionsAndEffects Version="2.8">
<Effects>
<EffectDLL guid="TFX">
<Effect name="Gamma 0.5%" iconid="2" guid="Gamma 0.5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.005" />
</Semantics>
</Effect>
<Effect name="Gamma 1%" iconid="2" guid="Gamma 1%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.01" />
</Semantics>
</Effect>
<Effect name="Gamma 1.5%" iconid="2" guid="Gamma 1.5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.015" />
</Semantics>
</Effect>
<Effect name="Gamma 2%" iconid="2" guid="Gamma 2%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.02" />
</Semantics>
</Effect>
<Effect name="Gamma 2.5%" iconid="2" guid="Gamma 2.5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.025" />
</Semantics>
</Effect>
<Effect name="Gamma 5%" iconid="2" guid="Gamma 5%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.05" />
</Semantics>
</Effect>
<Effect name="Gamma 10%" iconid="2" guid="Gamma 10%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.10" />
</Semantics>
</Effect>
<Effect name="Gamma 15%" iconid="2" guid="Gamma 15%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.15" />
</Semantics>
</Effect>
<Effect name="Gamma 20%" iconid="2" guid="Gamma 20%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.20" />
</Semantics>
</Effect>
<Effect name="Gamma 25%" iconid="2" guid="Gamma 25%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.25" />
</Semantics>
</Effect>
<Effect name="Gamma 33%" iconid="2" guid="Gamma 33%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.33" />
</Semantics>
</Effect>
<Effect name="Gamma 50%" iconid="2" guid="Gamma 50%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.50" />
</Semantics>
</Effect>
<Effect name="Gamma 67" iconid="2" guid="Gamma 67%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.67" />
</Semantics>
</Effect>
<Effect name="Gamma 75%" iconid="2" guid="Gamma 75%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.75" />
</Semantics>
</Effect>
<Effect name="Gamma 80%" iconid="2" guid="Gamma 80%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="0.80" />
</Semantics>
</Effect>
<Effect name="Gamma 125%" iconid="3" guid="Gamma 125%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="1.25" />
</Semantics>
</Effect>
<Effect name="Gamma 150%" iconid="3" guid="Gamma 150%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="1.50" />
</Semantics>
</Effect>
<Effect name="Gamma 175%" iconid="3" guid="Gamma 175%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="1.75" />
</Semantics>
</Effect>
<Effect name="Gamma 200%" iconid="3" guid="Gamma 200%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="2.00" />
</Semantics>
</Effect>
<Effect name="Gamma 250%" iconid="3" guid="Gamma 250%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="2.50" />
</Semantics>
</Effect>
<Effect name="Gamma 300%" iconid="3" guid="Gamma 300%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="3.00" />
</Semantics>
</Effect>
<Effect name="Gamma 500%" iconid="3" guid="Gamma 500%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="5.00" />
</Semantics>
</Effect>
<Effect name="Gamma 1000%" iconid="3" guid="Gamma 1000%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="10.00" />
</Semantics>
</Effect>
<Effect name="Gamma 1500%" iconid="3" guid="Gamma 1500%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="15.00" />
</Semantics>
</Effect>
<Effect name="Gamma 2000%" iconid="3" guid="Gamma 2000%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="20.00" />
</Semantics>
</Effect>
<Effect name="Gamma 2500%" iconid="3" guid="Gamma 2500%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="25.00" />
</Semantics>
</Effect>
<Effect name="Gamma 5000%" iconid="3" guid="Gamma 5000%" shadermodel="2">
<Param name="Animation" value="FX" />
<Param name="FXFile" value="DPL_Gamma_Effect.fx" />
<Param name="Technique" value="GammaEffect" />
<Semantics>
<Gamma type="float" value="50.00" />
</Semantics>
</Effect>
</EffectDLL>
</Effects>
</TransitionsAndEffects>


TheOnePb

Movie Maker 6.0 on Windows 7 + ShaderTFX, registeredSmiley
http://youtube.com/profile?user=TheOnePb1
PatrickL is not online. Last active: 12/4/2015 6:48:13 PM PatrickL
pleabo.home.comcast.net
Top 25 Poster
Joined: 31 Jul 2005
Total Posts: 1305
 
Re: Gamma Adjustments Effect
Posted: 04 Jul 2008 08:31 AM
TheOnePb you got it done nicely.

Some Thoughts:

You might make the iconid="2" for darker ones and iconid="3" for lighter ones.

<Param name="FXFile" value="gamma.fx" /> doesn't match the suggested name for the FX file.

Effects can be stacked so you might not need so many.
Maybe a nice binary progression off of 1.0 like:
1.25, 1.50, 2.00, 3.00, (5.00 if needed)
and their reciprocals:
0.80, 0.67, 0.50, 0.33, (0.20 if needed)

PatrickL

DPL Freeware Effects and Transitions for Vista MM Website
TheOnePb is not online. Last active: 4/3/2010 8:23:13 AM TheOnePb
youtube.com
Top 50 Poster
Joined: 15 Nov 2007
Total Posts: 520
 
Re: Gamma Adjustments Effect
Posted: 05 Jul 2008 07:23 AM
Patrick L.,

I updated my post with the XML. I changed the iconid's and the fxfile name, but the effects don't work anymoreSad... And.. Ooops: 0.66 .. 0.67 ofcourse!

I have:
DPL_Gamma_Effect.fx - Shared
DPL_Gamma_Effect.xml - AddOnTFX
DPL_Gamma_Effect.fx - in XML

What's wrong?

TheOnePb

Movie Maker 6.0 on Windows 7 + ShaderTFX, registeredSmiley
http://youtube.com/profile?user=TheOnePb1
PatrickL is not online. Last active: 12/4/2015 6:48:13 PM PatrickL
pleabo.home.comcast.net
Top 25 Poster
Joined: 31 Jul 2005
Total Posts: 1305
 
Re: Gamma Adjustments Effect
Posted: 05 Jul 2008 07:39 PM
Your XML worked OK for me with DPL_Gamma_Effect.fx in Shared. Typo? You called it gamma.fx before?

PatrickL

DPL Freeware Effects and Transitions for Vista MM Website
TheOnePb is not online. Last active: 4/3/2010 8:23:13 AM TheOnePb
youtube.com
Top 50 Poster
Joined: 15 Nov 2007
Total Posts: 520
 
Re: Gamma Adjustments Effect
Posted: 06 Jul 2008 03:33 PM
Mm.. It workes now :D ! But I just deleted the XML and FX and made them over and placed them in the right folders..
Replacing didn't work, delete and make over did.. :s ...
Bit weird, but I'm happy now.. Still love the effect!

TheOnePb

Movie Maker 6.0 on Windows 7 + ShaderTFX, registeredSmiley
http://youtube.com/profile?user=TheOnePb1
eblightning127 is not online. Last active: 10/8/2009 6:09:44 PM eblightning127
Joined: 06 Aug 2009
Total Posts: 12
 
Re: Gamma Adjustments Effect
Posted: 20 Aug 2009 11:36 PM
HeySmileythis effect looks AWESOME but whenever i put it into wmm and use it on a vid it just turns blackSaddid i do something wrong? thanx!
PatrickL is not online. Last active: 12/4/2015 6:48:13 PM PatrickL
pleabo.home.comcast.net
Top 25 Poster
Joined: 31 Jul 2005
Total Posts: 1305
 
Re: Gamma Adjustments Effect
Posted: 21 Aug 2009 03:06 PM
Black screen usually means:

1. Can't find the DPL_Gamma_Effect.fx file (wrong name, extension or folder(should be in Shared))
2. DPL_Gamma_Effect.fx file was corrupted - truncated etc.

Good luck, this will work if installed OK, PatrickL

DPL Freeware Effects and Transitions for Vista MM Website
eblightning127 is not online. Last active: 10/8/2009 6:09:44 PM eblightning127
Joined: 06 Aug 2009
Total Posts: 12
 
Re: Gamma Adjustments Effect
Posted: 22 Aug 2009 10:27 PM
hmm, it still doesnt seem to be workingSadim saving it as gammaeffects.xml woul that be a problem? thanx :)
chjoezen is not online. Last active: 11/11/2011 4:30:23 PM chjoezen
Joined: 17 Jan 2010
Total Posts: 27
 
What am I doing wrong?
Posted: 18 Jan 2010 06:32 PM
OK I am pretty sure I am messing up with the fx. When I attempt this in WMM it shows the effects in the effects list and even shows an example of what it does. However I just can't get it to work on my clips.


// Save as DPL_Gamma_Effect.fx to Shared Folder <----Do I copy this?
#include "common.fxh" <-----some sort of odd instructions or code?

//Global semantics for Gamma Effect <----necessary code or just a side note?
shared float gamma : Gamma = 1.0;

//////////////////////////////////////////////////////////////////////////////// <----Necessary code?
// Pixel Shader For Gamma Effect
float4 PS_Gamma(float2 t : TEXCOORD0) : COLOR {
float4 lgamma=1.0/gamma; // Inverse ala' graphic editors
lgamma.a = 1.0;
return saturate(pow(tex2D(PointSampler, t),lgamma)); // Not sure if saturate needed?
}

"Not sure if saturate needed?" seems out of place
////////////////////////////////////////////////////////////////////////////////
// Gamma Effect Technique
technique GammaEffect {
pass P0 {
VertexShader = compile vs_2_0 VS_Basic();
PixelShader = compile ps_2_0 PS_Gamma();
}
}



I don't copy this first line right?

<!-- ************* Save as DPL_Gamma_Effect.xml to AddOnTFX folder************* -->
<TransitionsAndEffects Version="2.8" >
<Effects>
<EffectDLL guid="TFX">
This spacing between lines, I assumed, didn't matter.
<Effect name="DPL Gamma 1.5" iconid="3" guid="DPL Gamma 1.5" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="1.5" />
</Semantics>
</Effect>
PatrickL is not online. Last active: 12/4/2015 6:48:13 PM PatrickL
pleabo.home.comcast.net
Top 25 Poster
Joined: 31 Jul 2005
Total Posts: 1305
 
Re: What am I doing wrong?
Posted: 18 Jan 2010 07:20 PM
Just to finalize this thread, here is exactly what I use on my machine.

Save the XML file to the AddOnTFX folder as DPL_Gamma_Effect.xml
Save the FX file to the Shared folder as DPL_Gamma_Effect.fx

If you are using Notepad, be sure to set Save as type: to All Files (*.*) so the correct extension will be saved. Save all of the purple lines.

The Shared folder has some protection, so you may have to save the FX file somewhere and move it to the Shared folder.



// Save as DPL_Gamma_Effect.fx to Shared Folder
#include "common.fxh"

//Global semantics for Gamma Effect
shared float gamma : Gamma = 1.0;

////////////////////////////////////////////////////////////////////////////////
// Pixel Shader For Gamma Effect
float4 PS_Gamma(float2 t : TEXCOORD0) : COLOR {
float4 lgamma=1.0/gamma; // Inverse ala' graphic editors
lgamma.a = 1.0;
return saturate(pow(tex2D(PointSampler, t),lgamma)); // Not sure if saturate needed?
}

////////////////////////////////////////////////////////////////////////////////
// Gamma Effect Technique
technique GammaEffect {
pass P0 {
VertexShader = compile vs_2_0 VS_Basic();
PixelShader = compile ps_2_0 PS_Gamma();
}
}





<!-- ************* Save as DPL_Gamma_Effect.xml to AddOnTFX folder************* -->
<TransitionsAndEffects Version="2.8" >
<Effects>
<EffectDLL guid="TFX">

<Effect name="DPL Gamma 1.11" iconid="3" guid="DPL Gamma 1.11" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="1.1111" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 1.25" iconid="3" guid="DPL Gamma 1.25" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="1.25" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 1.5" iconid="3" guid="DPL Gamma 1.5" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="1.5" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 2.0" iconid="3" guid="DPL Gamma 2.0" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="2.0" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 3.0" iconid="3" guid="DPL Gamma 3.0" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="3.0" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 0.9" iconid="2" guid="DPL Gamma 0.9" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="0.9" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 0.8" iconid="2" guid="DPL Gamma 0.8" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="0.8" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 0.667" iconid="2" guid="DPL Gamma 0.667" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="0.667" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 0.5" iconid="2" guid="DPL Gamma 0.5" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="0.5" />
</Semantics>
</Effect>

<Effect name="DPL Gamma 0.333" iconid="2" guid="DPL Gamma 0.333" ShaderModel="2">
<Animation value="FX" />
<FXFile value="DPL_Gamma_Effect.fx" />
<Technique value="GammaEffect"/>
<Semantics>
<Gamma type="float" value="0.333" />
</Semantics>
</Effect>

</EffectDLL>
</Effects>
</TransitionsAndEffects>


You can put more than one gamma effect on a clip to get the desired level of brightness correction.

Enjoy, PatrickL

DPL Freeware Effects and Transitions for Vista MM Website
chjoezen is not online. Last active: 11/11/2011 4:30:23 PM chjoezen
Joined: 17 Jan 2010
Total Posts: 27
 
Re: What am I doing wrong?
Posted: 18 Jan 2010 10:53 PM
It works now. Thank you very much.
PatrickL is not online. Last active: 12/4/2015 6:48:13 PM PatrickL
pleabo.home.comcast.net
Top 25 Poster
Joined: 31 Jul 2005
Total Posts: 1305
 
Re: What am I doing wrong?
Posted: 19 Jan 2010 06:24 AM
You're welcome. Happy movie making.

PatrickL

DPL Freeware Effects and Transitions for Vista MM Website
Previous Thread :: Next Thread 
Page 1 of 1
 
Movie Maker Forums  > Movie Maker Users Showcase  > Share Your Vista Transitions and Effects!!  > Gamma Adjustments Effect