View unanswered posts | View active topics It is currently Sun May 26, 2019 1:34 pm



This topic is locked, you cannot edit posts or make further replies.  [ 158 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
The unofficial BSNES pixel shader thread 
Author Message
Reply with quote
Post 
For those that care, I devised a method that does not alter the EXE in any way, nor does it need D3D9.DLL to be named, thus eliminating the issue of it always been hooked.

All it is, is a simple search and replace loader that hooks into the memory space of BSNES.EXE and overwrites the import table entries to load the required DLL. Thus, the loader is loaded each time shaders are wanted to be used.....

gllt, this also eliminates the moral issues that you face.


Sun Nov 23, 2008 10:15 am
Inmate

Joined: Thu Jan 11, 2007 4:28 am
Posts: 1485
Location: Salem, Oregon
Reply with quote
Post 


whoo hoo hooo! zelda on drugs! the nostalgia!

_________________
byuu wrote:
Seriously, what kind of asshole makes an old-school 2D emulator that requires a Core 2 to get full speed? >:(


Sun Nov 23, 2008 10:45 am
Profile WWW
NO VOWELS >:[
User avatar

Joined: Sun Aug 31, 2008 12:59 pm
Posts: 753
Location: ALABAMA
Reply with quote
Post 
h4tred wrote:
For those that care, I devised a method that does not alter the EXE in any way, nor does it need D3D9.DLL to be named, thus eliminating the issue of it always been hooked.

All it is, is a simple search and replace loader that hooks into the memory space of BSNES.EXE and overwrites the import table entries to load the required DLL. Thus, the loader is loaded each time shaders are wanted to be used.....

gllt, this also eliminates the moral issues that you face.


no one cares








but me give it now


Sun Nov 23, 2008 2:32 pm
Profile YIM WWW
Reply with quote
Post 
http://www.sendspace.com/file/o91g0c

There.

Read the prompts that come with it.


Sun Nov 23, 2008 9:38 pm
NO VOWELS >:[
User avatar

Joined: Sun Aug 31, 2008 12:59 pm
Posts: 753
Location: ALABAMA
Reply with quote
Post 
h4tred wrote:
http://www.sendspace.com/file/o91g0c

There.

Read the prompts that come with it.


I'll make you proud


then again probably not but THANKS


Mon Nov 24, 2008 7:12 am
Profile YIM WWW
NO VOWELS >:[
User avatar

Joined: Sun Aug 31, 2008 12:59 pm
Posts: 753
Location: ALABAMA
Reply with quote
Post 
in during shader mania 2

Code:
// WHAT A WASTE OF GPU.
texture tex1;
float2 rcpres;
//float Timer;
float4 End;
sampler s0 = sampler_state { texture = <tex1>; };

#define NUM 16

float2 Weights[NUM] = {
  0.00200, 0,
  -0.00200, 0,
  0, 0.00200,
  0, -0.00200,
  0.001625, 0.001625,
  -0.001625, -0.001625,
  -0.001625, 0.001625,
  0.001625, -0.001625,
  0.00200, 0.001625,
  0.001625, 0.00200,
  -0.00200,-0.001625,
  -0.001625,-0.00200,
  0.00200,-0.001625,
  -0.00200,0.001625,
  0.001625,-0.00200,
  -0.001625,0.00200
};

float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
   float4 Base = tex2D( s0, Tex.xy );
   return Base;
}

float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
   float4 Base = tex2D( s0, Tex.xy );
   float4 Color = 0;   
   for (int i = 0; i < NUM; ++i){
    Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*1*2) );   
    Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*2*2) );
    Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*3*2) );
    Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*4*2) );
   Color.rgb -= (Color.r * Color.b * Color.g)/3;
    //Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*5*2) );
    //Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*6*2) );
    //Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*7*2) );
    //Color += tex2D( s0, Tex.xy + (0.0001 * i) + (Weights[i]*8*2) );
   }
   End = Color;
   return ((Base * End/32) + End/64);
   //return ((Base * End/64) + End/128);
}

///*
Technique T0
{
    pass p0 { PixelShader = compile ps_3_0 Pass0(); }
    pass p1 { PixelShader = compile ps_3_0 Pass1(); }
}
//*/

/* 2.0 Pass instead?
Technique T0
{
    pass p0 { PixelShader = compile ps_2_0 Pass0(); }
    pass p1 { PixelShader = compile ps_2_0 Pass1(); }
}
*/


IT LOOKS LIKE ASHES too lazy for screenshot bbl

Code:
// WHAT A WASTE OF GPU.
texture tex1;
float2 rcpres;
//float Timer;
sampler s0 = sampler_state { texture = <tex1>; };

float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
   float4 Base = tex2D( s0, Tex.xy );
   return Base;
}

float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
   float4 Base = tex2D( s0, Tex.xy );
   float4 Color = Base;
   Color += tex2D( s0, Tex.xy+float2(0,0.0050) )/8;
   Color += tex2D( s0, Tex.xy-float2(0,0.0050) )/8;   
   Color += tex2D( s0, Tex.xy+float2(0.0050,0) )/8;   
   Color += tex2D( s0, Tex.xy-float2(0.0050,0) )/8;
   Color += tex2D( s0, Tex.xy+float2(0.0025,0.0025) )/8;
   Color += tex2D( s0, Tex.xy-float2(0.0025,0.0025) )/8;   
   Color += tex2D( s0, Tex.xy+float2(-0.0025,0.0025) )/8;   
   Color += tex2D( s0, Tex.xy-float2(-0.0025,0.0025) )/8;
   Color += round(Color)/3;
   Base += tex2D( s0, Tex.xy+float2(0,0.0050) )/8;
   Base += tex2D( s0, Tex.xy-float2(0,0.0050) )/8;   
   Base += tex2D( s0, Tex.xy+float2(0.0050,0) )/8;   
   Base += tex2D( s0, Tex.xy-float2(0.0050,0) )/8;
   Base += tex2D( s0, Tex.xy+float2(0.0025,0.0025) )/8;
   Base += tex2D( s0, Tex.xy-float2(0.0025,0.0025) )/8;   
   Base += tex2D( s0, Tex.xy+float2(-0.0025,0.0025) )/8;   
   Base += tex2D( s0, Tex.xy-float2(-0.0025,0.0025) )/8;
   Base.rgb = (Base.r + Base.g + Base.b)/3;
   Base.rgb = round(Base.rgb);
   Base = Base/1.5;
   return (Color * Base)/1.5 + (Color/4);
}

Technique T0
{
    pass p0 { PixelShader = compile ps_3_0 Pass0(); }
    pass p1 { PixelShader = compile ps_3_0 Pass1(); }
}


its prettay
screenshots later


Fri Mar 06, 2009 10:57 am
Profile YIM WWW
Reply with quote
Post 
bout time I also got into doing this again......................................


Fri Mar 06, 2009 1:02 pm
NO VOWELS >:[
User avatar

Joined: Sun Aug 31, 2008 12:59 pm
Posts: 753
Location: ALABAMA
Reply with quote
Post 
http://img6.imageshack.us/img6/8150/oot.png

Code:
texture tex1;
float2 rcpres;
sampler s0 = sampler_state {
    Texture = (tex1);
};
float pixelWidth = 0.0010;
float PixelKernel[13] =
{
    -6,
    -5,
    -4,
    -3,
    -2,
    -1,
     0,
     1,
     2,
     3,
     4,
     5,
     6,
};
static const float BlurWeights[13] =
{
    0.002216,
    0.008764,
    0.026995,
    0.064759,
    0.120985,
    0.176033,
    0.199471,
    0.176033,
    0.120985,
    0.064759,
    0.026995,
    0.008764,
    0.002216,
};

float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
   float4 Base = tex2D( s0, Tex.xy );
   return Base;
}

float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
    float4 Color = 0;
    float2 Samp = Tex;

    for (int i = 0; i < 13; i++) {
        Samp.x = Tex.x + PixelKernel[i] * (pixelWidth/1.5);
        Color += tex2D(s0, Samp.xy) * BlurWeights[i];
    }
   
   for (int i = 0; i < 13; i++) {
        Samp.y = Tex.y + PixelKernel[i] * pixelWidth;
        Color += tex2D(s0, Samp.xy) * BlurWeights[i];
    }
      
   Color.rgb *= round(Color.rgb)/1.25;
   Color.rgb *= (Color.r + Color.g + Color.b)/3;
    return Color;
}

technique MyTechnique
{
   pass p0 { PixelShader = compile ps_3_0 Pass0(); }
    pass p1 { PixelShader = compile ps_3_0 Pass1(); }
}


Fri Mar 13, 2009 12:10 pm
Profile YIM WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 158 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.