Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d4e52f
commit 927662b
Showing
31 changed files
with
209 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# Custom | ||
*.script text=crlf linguist-language=Lua | ||
*.ltx text=crlf linguist-language=INI | ||
*.ps text=crlf linguist-language=HLSL | ||
*.vs text=crlf linguist-language=HLSL | ||
*.s text=crlf linguist-language=Lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
*.h text=crlf linguist-language=HLSL | ||
*.s text=crlf linguist-language=Lua | ||
*.h text=crlf linguist-language=HLSL diff=HLSL | ||
*.ps text=crlf linguist-language=HLSL diff=HLSL | ||
*.vs text=crlf linguist-language=HLSL diff=HLSL | ||
*.ds text=crlf linguist-language=HLSL diff=HLSL | ||
*.hs text=crlf linguist-language=HLSL diff=HLSL | ||
*.cs text=crlf linguist-language=HLSL diff=HLSL | ||
*.gs text=crlf linguist-language=HLSL diff=HLSL |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function element_0(shader, t_base, t_second, t_detail) | ||
shader:begin("fxaa_main", "fxaa_main") | ||
:fog(false) | ||
:zb(false, false) | ||
shader:sampler("s_base0"):texture("$user$generic0") | ||
end |
Binary file not shown.
26 changes: 26 additions & 0 deletions
26
Game/Resources_SoC_1.0006/gamedata/shaders/r2/fxaa_main.vs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "common.h" | ||
|
||
uniform float4 screen_res; // Screen resolution (x-Width,y-Height, zw - 1/resolution) | ||
|
||
struct v | ||
{ | ||
float3 P : POSITION; | ||
float2 tc0 : TEXCOORD0; | ||
}; | ||
|
||
struct v2p | ||
{ | ||
float2 tc0 : TEXCOORD0; | ||
float4 HPos : POSITION; | ||
}; | ||
|
||
////////////////////////////////////////////////////////////////////////////////////////// | ||
// Vertex | ||
v2p main ( v I ) | ||
{ | ||
v2p O; | ||
O.HPos = float4 (I.P.x * screen_res.z * 2 - 1, (I.P.y * screen_res.w * 2 - 1)* -1, 0, 1); | ||
O.tc0 = I.tc0; | ||
|
||
return O; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function element_0(shader, t_base, t_second, t_detail) | ||
shader:begin("fxaa_main", "fxaa_main") | ||
:fog(false) | ||
:zb(false, false) | ||
shader:dx10texture("s_base0", "$user$generic0") | ||
shader:dx10sampler("smp_rtlinear") | ||
end |
Binary file not shown.
26 changes: 26 additions & 0 deletions
26
Game/Resources_SoC_1.0006/gamedata/shaders/r3/fxaa_main.vs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "common.h" | ||
|
||
uniform float4 screen_res; // Screen resolution (x-Width,y-Height, zw - 1/resolution) | ||
|
||
struct v | ||
{ | ||
float3 P : POSITION; | ||
float2 Tex0 : TEXCOORD0; | ||
}; | ||
|
||
struct v2p | ||
{ | ||
float2 Tex0 : TEXCOORD0; | ||
float4 HPos : SV_Position; | ||
}; | ||
|
||
////////////////////////////////////////////////////////////////////////////////////////// | ||
// Vertex | ||
v2p main ( v I ) | ||
{ | ||
v2p O; | ||
O.HPos = float4 (I.P.x * screen_res.z * 2 - 1, (I.P.y * screen_res.w * 2 - 1)* -1, 0, 1); | ||
O.Tex0 = I.Tex0; | ||
|
||
return O; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include "stdafx.h" | ||
|
||
void CRenderTarget::phase_fxaa() | ||
{ | ||
u32 Offset = 0; | ||
const float _w = float(Device.dwWidth); | ||
const float _h = float(Device.dwHeight); | ||
const float du = ps_r1_pps_u, dv = ps_r1_pps_v; | ||
|
||
#if defined(USE_DX10) || defined(USE_DX11) | ||
ref_rt dest_rt = RImplementation.o.dx10_msaa ? rt_Generic : rt_Color; | ||
u_setrt(dest_rt, nullptr, nullptr, HW.pBaseZB); | ||
|
||
FVF::V* pv = (FVF::V*)RCache.Vertex.Lock(4, g_fxaa->vb_stride, Offset); | ||
pv->set(du + 0, dv + float(_h), 0, 0, 1); | ||
pv++; | ||
pv->set(du + 0, dv + 0, 0, 0, 0); | ||
pv++; | ||
pv->set(du + float(_w), dv + float(_h), 0, 1, 1); | ||
pv++; | ||
pv->set(du + float(_w), dv + 0, 0, 1, 0); | ||
pv++; | ||
#else | ||
u_setrt(rt_Generic_0, nullptr, nullptr, HW.pBaseZB); | ||
RCache.set_CullMode(CULL_NONE); | ||
RCache.set_Stencil(FALSE); | ||
|
||
FVF::V* pv = (FVF::V*)RCache.Vertex.Lock(4, g_fxaa->vb_stride, Offset); | ||
pv->set(du - 0.5, dv + float(_h) - 0.5, 0, 0, 1); | ||
pv++; | ||
pv->set(du - 0.5, dv - 0.5, 0, 0, 0); | ||
pv++; | ||
pv->set(du + float(_w) - 0.5, dv + float(_h) - 0.5, 0, 1, 1); | ||
pv++; | ||
pv->set(du + float(_w) - 0.5, dv - 0.5, 0, 1, 0); | ||
pv++; | ||
#endif | ||
RCache.Vertex.Unlock(4, g_fxaa->vb_stride); | ||
|
||
RCache.set_Element(s_fxaa->E[0]); | ||
RCache.set_Geometry(g_fxaa); | ||
RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); | ||
|
||
#if defined(USE_DX10) || defined(USE_DX11) | ||
HW.pContext->CopyResource(rt_Generic_0->pTexture->surface_get(), dest_rt->pTexture->surface_get()); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
927662b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А ты в курсе, что он без люмпаса толком ничего не делает?
927662b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хм, ну я вижу разницу.
Это шо?
927662b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если что, вдруг, на всякий случай: автор FXAA – @avbaula. Коммит я брал из репозитория @avoitishin =)
А в Окси улучшенная версия от @RainbowZerg.