Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added CoreFrameworkPlusRC01.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Data/Data.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Options]
Fullscreen=0
WindowSize=2
WindowSize=3
SFX=100
BGM=100
VAPORWAVE=0
Expand Down
Binary file modified Data/Data.sav
Binary file not shown.
44 changes: 44 additions & 0 deletions Effects/CS_MaskAlpha.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

// Pixel shader input structure
struct PS_INPUT
{
float4 Position : POSITION;
float2 Texture : TEXCOORD0;
};

// Pixel shader output structure
struct PS_OUTPUT
{
float4 Color : COLOR0;
};

// Global variables
sampler2D Tex0;
float4 fColor;
float fPower;

PS_OUTPUT ps_main( in PS_INPUT In )
{
// Output pixel
PS_OUTPUT Out;

Out.Color = tex2D(Tex0, In.Texture);
float4 f4 = Out.Color * float4(0.299f, 0.587f, 0.114f, 1.0f);
float fGrey = f4.r + f4.g + f4.b;

Out.Color.rgb=fColor.rgb;
Out.Color.a = 1.0f-fGrey*fPower;

return Out;
}

// Effect technique
technique tech_main
{
pass P0
{
// shaders
VertexShader = NULL;
PixelShader = compile ps_2_0 ps_main();
}
}
Binary file added Effects/CS_MaskAlpha.fxc
Binary file not shown.
64 changes: 64 additions & 0 deletions Effects/CS_MaskAlpha.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

// Pixel shader input structure
struct PS_INPUT
{
float4 Tint : COLOR0;
float2 texCoord : TEXCOORD0;
float4 Position : SV_POSITION;
};

// Pixel shader output structure
struct PS_OUTPUT
{
float4 Color : SV_TARGET;
};

// Global variables
Texture2D<float4> Tex0 : register(t0);
sampler Tex0Sampler : register(s0);

cbuffer PS_VARIABLES : register(b0)
{
float4 fColor;
float fPower;
};

PS_OUTPUT ps_main( in PS_INPUT In )
{
// Output pixel
PS_OUTPUT Out;

Out.Color = Tex0.Sample(Tex0Sampler, In.texCoord) * In.Tint;
float4 f4 = Out.Color * float4(0.299f, 0.587f, 0.114f, 1.0f);
float fGrey = f4.r + f4.g + f4.b;

Out.Color.rgb=fColor.rgb;
Out.Color.a = 1.0f-fGrey*fPower;

return Out;
}

float4 GetColorPM(float2 xy, float4 tint)
{
float4 color = Tex0.Sample(Tex0Sampler, xy) * tint;
if ( color.a != 0 )
color.rgb /= color.a;
return color;
}

PS_OUTPUT ps_main_pm( in PS_INPUT In )
{
// Output pixel
PS_OUTPUT Out;

Out.Color = GetColorPM(In.texCoord, In.Tint);
float4 f4 = Out.Color * float4(0.299f, 0.587f, 0.114f, 1.0f);
float fGrey = f4.r + f4.g + f4.b;

Out.Color.rgb=fColor.rgb;
Out.Color.a = 1.0f-fGrey*fPower;
Out.Color.rgb *= Out.Color.a;

return Out;
}

Binary file added Effects/CS_MaskAlpha.premultiplied.fxc
Binary file not shown.
25 changes: 25 additions & 0 deletions Effects/CS_MaskAlpha.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<effect>
<name>Mask Alpha</name>
<description>Transform the light areas into transparent and colorize the result</description>
<author>Eagle4/Sphax - Willay Clement, Flavien Clermont</author>
<company>Complex-softwares</company>
<website>http://complex.softwares.free.fr</website>
<parameter>
<name>Color</name>
<code>fColor</code>
<description>Color result of the non alpha parts</description>
<type>int_float4</type>
<property>COLOR</property>
<value>0</value>
</parameter>
<parameter>
<name>Power</name>
<code>fPower</code>
<description>Power of the alpha</description>
<type>float</type>
<property>edit</property>
<value>1</value>
<min>0.0</min>
</parameter>
</effect>

59 changes: 59 additions & 0 deletions Effects/ColorReplacer.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
sampler2D img;

const float HALF = 128.0/255;
float4 R, G, B, C, M, Y, T, P, O;

float4 ps_main(in float2 In : TEXCOORD0) : COLOR0
{
float4 o = tex2D(img,In);

if(o.r == 1)
{
if(o.g == 1)
{
if(o.b == 0)
o.rgb = Y.rgb;
}
else if(o.g == 0)
{
if(o.b == 1)
o.rgb = M.rgb;
else if(o.b == 0)
o.rgb = R.rgb;
}
}
else if(o.r == 0)
{
if(o.g == 1)
{
if(o.b == 1)
o.rgb = C.rgb;
else if(o.b == 0)
o.rgb = G.rgb;
}
else if(o.g == 0)
{
if(o.b == 1)
o.rgb = B.rgb;
}
else if(o.g == HALF && o.b == HALF)
{
o.rgb = T.rgb;
}
}
else if(o.r == HALF)
{
if(o.g == 0 && o.b == HALF)
{
o.rgb = P.rgb;
}
else if(o.g == HALF && o.b == 0)
{
o.rgb = O.rgb;
}
}

return o;
}

technique tech_main { pass P0 { PixelShader = compile ps_2_0 ps_main(); }}
Binary file added Effects/ColorReplacer.fxc
Binary file not shown.
133 changes: 133 additions & 0 deletions Effects/ColorReplacer.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
struct PS_INPUT
{
float4 Tint : COLOR0;
float2 texCoord : TEXCOORD0;
float4 Position : SV_POSITION;
};

Texture2D<float4> img : register(t0);
sampler imgSampler : register(s0);

cbuffer PS_VARIABLES : register(b0)
{
float4 R;
float4 G;
float4 B;
float4 C;
float4 M;
float4 Y;
float4 T;
float4 P;
float4 O;
};

static const float HALF = 128.0/255;

float4 ps_main( in PS_INPUT In ) : SV_TARGET
{
float4 o = img.Sample(imgSampler, In.texCoord) * In.Tint;

if(o.r == 1)
{
if(o.g == 1)
{
if(o.b == 0)
o.rgb = Y.rgb;
}
else if(o.g == 0)
{
if(o.b == 1)
o.rgb = M.rgb;
else if(o.b == 0)
o.rgb = R.rgb;
}
}
else if(o.r == 0)
{
if(o.g == 1)
{
if(o.b == 1)
o.rgb = C.rgb;
else if(o.b == 0)
o.rgb = G.rgb;
}
else if(o.g == 0)
{
if(o.b == 1)
o.rgb = B.rgb;
}
else if(o.g == HALF && o.b == HALF)
{
o.rgb = T.rgb;
}
}
else if(o.r == HALF)
{
if(o.g == 0 && o.b == HALF)
{
o.rgb = P.rgb;
}
else if(o.g == HALF && o.b == 0)
{
o.rgb = O.rgb;
}
}

return o;
}

float4 ps_main_pm( in PS_INPUT In ) : SV_TARGET
{
float4 o = img.Sample(imgSampler, In.texCoord) * In.Tint;
if ( o.a != 0 )
o.rgb /= o.a;

if(o.r == 1)
{
if(o.g == 1)
{
if(o.b == 0)
o.rgb = Y.rgb;
}
else if(o.g == 0)
{
if(o.b == 1)
o.rgb = M.rgb;
else if(o.b == 0)
o.rgb = R.rgb;
}
}
else if(o.r == 0)
{
if(o.g == 1)
{
if(o.b == 1)
o.rgb = C.rgb;
else if(o.b == 0)
o.rgb = G.rgb;
}
else if(o.g == 0)
{
if(o.b == 1)
o.rgb = B.rgb;
}
else if(o.g == HALF && o.b == HALF)
{
o.rgb = T.rgb;
}
}
else if(o.r == HALF)
{
if(o.g == 0 && o.b == HALF)
{
o.rgb = P.rgb;
}
else if(o.g == HALF && o.b == 0)
{
o.rgb = O.rgb;
}
}

o.rgb *= o.a;
return o;
}
Binary file added Effects/ColorReplacer.premultiplied.fxc
Binary file not shown.
Loading