-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from OGSR/dev [skip ci]
- Loading branch information
Showing
100 changed files
with
1,036 additions
and
410 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
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
Binary file modified
BIN
+140 Bytes
(110%)
Game/Resources_SoC_1.0006/gamedata/shaders/r3/combine_2_naa.ps
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
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
Binary file modified
BIN
+82 Bytes
(100%)
Game/Resources_SoC_1.0006/gamedata/shaders/r3/deffer_base_aref_bump.ps
Binary file not shown.
Binary file modified
BIN
+82 Bytes
(100%)
Game/Resources_SoC_1.0006/gamedata/shaders/r3/deffer_base_aref_flat.ps
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
Game/Resources_SoC_1.0006/gamedata/shaders/r3/deffer_base_bump.ps
Binary file not shown.
Binary file modified
BIN
+23 Bytes
(100%)
Game/Resources_SoC_1.0006/gamedata/shaders/r3/deffer_base_flat.ps
Binary file not shown.
Binary file modified
BIN
+277 Bytes
(110%)
Game/Resources_SoC_1.0006/gamedata/shaders/r3/deffer_impl_flat.ps
Binary file not shown.
Binary file modified
BIN
+30 Bytes
(100%)
Game/Resources_SoC_1.0006/gamedata/shaders/r3/deffer_particle.ps
Binary file not shown.
Binary file not shown.
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,24 @@ | ||
function element_0(shader, t_base, t_second, t_detail) | ||
shader:begin("stub_screen_space", "ogsr_sslr") | ||
:fog(false) | ||
:zb(false, false) | ||
shader:dx10texture("s_position", "$user$position") | ||
shader:dx10texture("s_image", "$user$generic0") | ||
shader:dx10texture("s_normal", "$user$normal") | ||
shader:dx10texture("s_env0", "$user$env_s0") | ||
shader:dx10texture("s_env1", "$user$env_s1") | ||
end | ||
|
||
function element_1(shader, t_base, t_second, t_detail) | ||
shader:begin("stub_screen_space", "ogsr_sslr_gauss") | ||
:fog(false) | ||
:zb(false, false) | ||
shader:dx10texture("s_image", "$user$SSLR0") | ||
end | ||
|
||
function element_2(shader, t_base, t_second, t_detail) | ||
shader:begin("stub_screen_space", "ogsr_sslr_gauss") | ||
:fog(false) | ||
:zb(false, false) | ||
shader:dx10texture("s_image", "$user$SSLR1") | ||
end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,89 @@ | ||
#include "stdafx.h" | ||
|
||
void CRenderTarget::phase_SSLR() | ||
{ | ||
u32 Offset = 0; | ||
constexpr float d_Z = EPS_S; | ||
constexpr float d_W = 1.0f; | ||
constexpr u32 C = color_rgba(0, 0, 0, 255); | ||
|
||
// Half-pixel offset (DX9 only) | ||
#if defined(USE_DX10) || defined(USE_DX11) | ||
constexpr Fvector2 p0{ 0.0f, 0.0f }, p1{ 1.0f, 1.0f }; | ||
#else | ||
Fvector2 p0, p1; | ||
p0.set(0.5f / w, 0.5f / h); | ||
p1.set((w + 0.5f) / w, (h + 0.5f) / h); | ||
#endif | ||
|
||
const u32 w = Device.dwWidth, h = Device.dwHeight; | ||
|
||
///////////////////////////////////////////////////////////////////////////////////// | ||
// phase SSLR | ||
u_setrt(rt_SSLR_0, nullptr, nullptr, HW.pBaseZB); | ||
|
||
RCache.set_CullMode(CULL_NONE); | ||
RCache.set_Stencil(FALSE); | ||
|
||
FVF::TL* pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); | ||
pv->set(0, float(h), d_Z, d_W, C, p0.x, p1.y); pv++; | ||
pv->set(0, 0, d_Z, d_W, C, p0.x, p0.y); pv++; | ||
pv->set(float(w), float(h), d_Z, d_W, C, p1.x, p1.y); pv++; | ||
pv->set(float(w), 0, d_Z, d_W, C, p1.x, p0.y); pv++; | ||
RCache.Vertex.Unlock(4, g_combine->vb_stride); | ||
|
||
RCache.set_Element(s_SSLR->E[0]); | ||
|
||
Fmatrix m_inv_v; | ||
m_inv_v.invert(Device.mView); | ||
RCache.set_c("m_inv_v", m_inv_v); | ||
RCache.set_c("SSLR_params", ps_ext_SSLR_L, 1.f, 1.f, 1.f); | ||
|
||
RCache.set_Geometry(g_combine); | ||
RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); | ||
|
||
if (fis_zero(ps_ext_SSLR_blur)) | ||
return; | ||
|
||
///////////////////////////////////////////////////////////////////////////////////// | ||
// hblur | ||
u_setrt(rt_SSLR_1, nullptr, nullptr, HW.pBaseZB); | ||
|
||
RCache.set_CullMode(CULL_NONE); | ||
RCache.set_Stencil(FALSE); | ||
|
||
pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); | ||
pv->set(0, float(h), d_Z, d_W, C, p0.x, p1.y); pv++; | ||
pv->set(0, 0, d_Z, d_W, C, p0.x, p0.y); pv++; | ||
pv->set(float(w), float(h), d_Z, d_W, C, p1.x, p1.y); pv++; | ||
pv->set(float(w), 0, d_Z, d_W, C, p1.x, p0.y); pv++; | ||
RCache.Vertex.Unlock(4, g_combine->vb_stride); | ||
|
||
RCache.set_Element(s_SSLR->E[1]); | ||
|
||
RCache.set_c("blur_params", ps_ext_SSLR_blur, 0.f, float(w), float(h)); | ||
|
||
RCache.set_Geometry(g_combine); | ||
RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); | ||
|
||
///////////////////////////////////////////////////////////////////////////////////// | ||
// vblur | ||
u_setrt(rt_SSLR_0, nullptr, nullptr, HW.pBaseZB); | ||
|
||
RCache.set_CullMode(CULL_NONE); | ||
RCache.set_Stencil(FALSE); | ||
|
||
pv = (FVF::TL*)RCache.Vertex.Lock(4, g_combine->vb_stride, Offset); | ||
pv->set(0, float(h), d_Z, d_W, C, p0.x, p1.y); pv++; | ||
pv->set(0, 0, d_Z, d_W, C, p0.x, p0.y); pv++; | ||
pv->set(float(w), float(h), d_Z, d_W, C, p1.x, p1.y); pv++; | ||
pv->set(float(w), 0, d_Z, d_W, C, p1.x, p0.y); pv++; | ||
RCache.Vertex.Unlock(4, g_combine->vb_stride); | ||
|
||
RCache.set_Element(s_SSLR->E[2]); | ||
|
||
RCache.set_c("blur_params", 0.f, ps_ext_SSLR_blur, float(w), float(h)); | ||
|
||
RCache.set_Geometry(g_combine); | ||
RCache.Render(D3DPT_TRIANGLELIST, Offset, 0, 4, 0, 2); | ||
} |
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.