Quote: "Is there anyway to increase the Vignette intensity?"
At the line:
Quote: "float2 vpos = (IN.uv - float2(.5,.5)) * 2 ;"
increase the 2.
As for how to merge two shaders, I may do a proper tutorial some day, but here's how to add the vignetting to the film grain.
First,open the film grain shader (if you have dark shader us that or if you don't, notepad works). Then scroll down to the pixel shader part (often Bond1's shaders will have the line
Quote: "//Pixel shader"
just above to make it easier to find), there you will find at the bottom the line
Quote: " return (combine * Contrast) + Brightness;"
above this paste the vignetting code
Quote: " //vignette
float2 vpos = (IN.uv - float2(.5,.5)) * 2 ;
//vpos.x = vpos.x * -1.5 - 0; //can also scale and shift horizontally
float dist = (dot(vpos, vpos)) ;
dist = 1-0.4 * dist;"
however the film grain shader uses Tex.xy as the UVs, so rename IN.uv to Tex.xy.
Next, multiply the final line by dist
Quote: "return ((combine * Contrast) + Brightness)*dist;"
This however will result in an error, to solve it all you neede to do is scroll down to the bottom were you will find the lines
Quote: "
technique Negative
<
//the initial texture we want DarkBASIC Professional to place the scene
string RenderColorTarget = "frame";
>
{
pass Negative
<
//use a blank render target to draw to the screen
string RenderColorTarget = "";
>
{
ZEnable = False;
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 ps_main( );
}
}"
Now change
Quote: "PixelShader = compile ps_2_0 ps_main( );"
to
Quote: "PixelShader = compile ps_2_b ps_main( );"
If something compiles on the first try. Something is terribly wrong.