home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
eroticos
/
dreamstrippergdidemoinstall.exe
/
DreamStripper.msi
/
_8A941BDB14F779B8105FDFAA799C6946
/
_A24D5382C5674D2A9A9A8898E80E8545
< prev
next >
Wrap
Text File
|
2005-05-15
|
2KB
|
100 lines
/*********************************************************************
//*
//*Copyright (c) 2001-2005, Ensign Games Ltd. All rights reserved.
//*
//*********************************************************************/
float2 Resolution : RESOLUTION : register(c0);
sampler Source : register(s0);
struct VS_OUTPUT
{
float4 Position : POSITION;
float2 TexCoord0 : TEXCOORD0;
float2 TexCoord1 : TEXCOORD1;
float2 TexCoord2 : TEXCOORD2;
float2 TexCoord3 : TEXCOORD3;
float2 TexCoord4 : TEXCOORD4;
float2 TexCoord5 : TEXCOORD5;
float2 TexCoord6 : TEXCOORD6;
};
VS_OUTPUT VS(in float4 Position : POSITION, in float2 TexCoord : TEXCOORD0)
{
VS_OUTPUT Out = (VS_OUTPUT)0;
Out.Position = Position;
Out.TexCoord0 = TexCoord;//center
Out.TexCoord1 = TexCoord + Resolution * float2(0, -1);
Out.TexCoord2 = TexCoord + Resolution * float2(0, 1);
Out.TexCoord3 = TexCoord + Resolution * float2(1, 0);
Out.TexCoord4 = TexCoord + Resolution * float2(-1, 0);
return Out;
}
float4 PS(VS_OUTPUT In) : COLOR
{
//simple filter that weights the pixel based on the amount of alpha it has
float4 sample;
float3 color;
float divider;
float alpha;
sample = tex2D(Source, In.TexCoord0);
divider = sample.a;
alpha = sample.a;
color = sample.xyz * sample.a;
sample = tex2D(Source, In.TexCoord1.xy);
color += sample.xyz * sample.a;
divider += sample.a;
sample = tex2D(Source, In.TexCoord2.xy);
color += sample.xyz * sample.a;
divider += sample.a;
sample = tex2D(Source, In.TexCoord3.xy);
color += sample.xyz * sample.a;
divider += sample.a;
sample = tex2D(Source, In.TexCoord4.xy);
color += sample.xyz * sample.a;
divider += sample.a;
return float4(color/divider, alpha);
}
///////////////////////////////////////////////////////////////////
//Techniques
///////////////////////////////////////////////////////////////////
technique Normal
{
pass TextureSpaceLighting
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
MagFilter[0] = Linear;
MinFilter[0] = Linear;
MipFilter[0] = Linear;
AddressU[0] = mirror;
AddressV[0] = mirror;
ZEnable = false;
ZFunc = LessEqual;
FillMode = Solid;
ZWriteEnable = false;
AlphaTestEnable = false;
AlphaFunc = Always;
AlphaBlendEnable = false;
SrcBlend = One;
DestBlend = Zero;
BlendOp = Add;
CullMode = None;
}
}