Skip to content

Commit

Permalink
Fixed file issue
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Jun 25, 2023
1 parent d8ce5d6 commit 4fdadb3
Show file tree
Hide file tree
Showing 35 changed files with 28 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion shaders/cshade/cPyramidBlur.fx → shaders/cPyramidBlur.fx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ namespace cPyramidBlur
float4 GetPixelScale(VS2PS_Scale Input, sampler2D SampleSource, int ScaleMethod)
{
float4 OutputColor = 0.0;

float3 Weights = 0.0;

switch(ScaleMethod)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,32 @@
return Radius * SinCosTheta;
}

float4 Filter3x3(sampler2D SampleSource, float2 Tex, bool DownSample)
{
const float3 Weights = float3(1.0, 2.0, 4.0) / 16.0;
float2 PixelSize = float2(ddx(Tex.x), ddy(Tex.y));
PixelSize = (DownSample) ? PixelSize * 0.5 : PixelSize;

float4 STex[3] =
{
Tex.xyyy + (float4(-2.0, 2.0, 0.0, -2.0) * abs(PixelSize.xyyy)),
Tex.xyyy + (float4(0.0, 2.0, 0.0, -2.0) * abs(PixelSize.xyyy)),
Tex.xyyy + (float4(2.0, 2.0, 0.0, -2.0) * abs(PixelSize.xyyy))
};

float4 OutputColor = 0.0;
OutputColor += (tex2D(SampleSource, STex[0].xy) * Weights[0]);
OutputColor += (tex2D(SampleSource, STex[1].xy) * Weights[1]);
OutputColor += (tex2D(SampleSource, STex[2].xy) * Weights[0]);
OutputColor += (tex2D(SampleSource, STex[0].xz) * Weights[1]);
OutputColor += (tex2D(SampleSource, STex[1].xz) * Weights[2]);
OutputColor += (tex2D(SampleSource, STex[2].xz) * Weights[1]);
OutputColor += (tex2D(SampleSource, STex[0].xw) * Weights[0]);
OutputColor += (tex2D(SampleSource, STex[1].xw) * Weights[1]);
OutputColor += (tex2D(SampleSource, STex[2].xw) * Weights[0]);
return OutputColor;
}

/*
[Convolutions - Edge Detection]
*/
Expand Down Expand Up @@ -221,8 +247,8 @@
float SumRGB = length(Color.rgb);

float2 P = 0.0;
P.x = (DotRG == 0.0) ? White.x : atan2(Color.g, Color.r);
P.y = (SumRGB == 0.0) ? White.y : asin(SumRG / SumRGB);
P.x = (DotRG == 0.0) ? White.x : atan2(abs(Color.g), abs(Color.r));
P.y = (SumRGB == 0.0) ? White.y : asin(abs(SumRG / SumRGB));

return saturate(P * IHalfPi);
}
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 4fdadb3

Please sign in to comment.