Skip to content

Commit

Permalink
xrRenderGL: r2_parallax_h works now
Browse files Browse the repository at this point in the history
Fixed two crashes on mixed when msaa is on
  • Loading branch information
SkyLoaderr committed Dec 24, 2018
1 parent ec9d0d0 commit 1285c69
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Binary file modified res/gamedata/shaders/gl/combine_1.ps
Binary file not shown.
2 changes: 0 additions & 2 deletions res/gamedata/shaders/gl/common_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#ifndef SMAP_size
#define SMAP_size 1024.0
#endif
#define PARALLAX_H 0.02
#define parallax float2(PARALLAX_H, -PARALLAX_H/2)
//////////////////////////////////////////////////////////////////////////////////////////

#endif // common_defines_h_included
Binary file modified res/gamedata/shaders/gl/mark_msaa_edges.ps
Binary file not shown.
1 change: 1 addition & 0 deletions res/gamedata/shaders/gl/shared/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void sincos(float x, out float s, out float c) { s = sin(x); c = cos(x); }
uniform float4 pos_decompression_params;
uniform float4 pos_decompression_params2;

uniform float4 parallax;
// uniform float4 screen_res; // Screen resolution (x-Width,y-Height, zw - 1/resolution)
//}

Expand Down
10 changes: 5 additions & 5 deletions src/Layers/xrRenderPC_GL/gl_rendertarget_mark_msaa_edges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ void CRenderTarget::mark_msaa_edges()

// Fill vertex buffer
FVF::TL2uv* pv = (FVF::TL2uv*)RCache.Vertex.Lock(4, g_combine_2UV->vb_stride, Offset);
pv->set(-1, -1, 0, d_W, C, 0, 1, 0, 0);
pv->set(-1, -1, 0, d_W, C, 0, 0, 0, 0);
pv++;
pv->set(-1, 1, d_Z, d_W, C, 0, 0, 0, 0);
pv->set(-1, 1, d_Z, d_W, C, 0, 1, 0, 0);
pv++;
pv->set(1, -1, d_Z, d_W, C, 1, 1, 0, 0);
pv->set(1, -1, d_Z, d_W, C, 1, 0, 0, 0);
pv++;
pv->set(1, 1, d_Z, d_W, C, 1, 0, 0, 0);
pv->set(1, 1, d_Z, d_W, C, 1, 1, 0, 0);
pv++;
RCache.Vertex.Unlock(4, g_combine_2UV->vb_stride);
u_setrt(NULL,NULL,NULL, rt_MSAADepth->pZRT);
u_setrt(Device.dwWidth, Device.dwHeight, 0, 0, 0, rt_MSAADepth->pZRT);
RCache.set_Element(s_mark_msaa_edges->E[0]);
RCache.set_Geometry(g_combine_2UV);
RCache.set_Stencil(TRUE, D3DCMP_ALWAYS, 0x80, 0xFF, 0x80, D3DSTENCILOP_KEEP, D3DSTENCILOP_REPLACE,
Expand Down

0 comments on commit 1285c69

Please sign in to comment.