Skip to content

Commit

Permalink
xrRender_GL: another portion of shaders fixes..
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jul 1, 2018
1 parent ced80b9 commit 40c6065
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 6 deletions.
Binary file modified res/gamedata/shaders/gl/combine_1.ps
Binary file not shown.
2 changes: 1 addition & 1 deletion res/gamedata/shaders/gl/deffer_tree_bump.vs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ v2p_bumped _main (v_tree I)
float3 pos = mul (m_xform, I.P);

//
float base = m_xform._42 ; // take base height from matrix
float base = m_xform[3][1] ; // take base height from matrix
float dp = calc_cyclic (wave.w+dot(pos,float3(wave)));
float H = pos.y - base ; // height of vertex (scaled, rotated, etc.)
float frac = I.tc.z*consts.x; // fractional (or rigidity)
Expand Down
4 changes: 2 additions & 2 deletions res/gamedata/shaders/gl/deffer_tree_flat.vs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ v2p_flat _main (v_tree I)
float3 pos = mul (m_xform, I.P);

//
float base = m_xform._42; // take base height from matrix
float base = m_xform[3][1]; // take base height from matrix
float dp = calc_cyclic (wave.w+dot(pos,float3(wave)));
float H = pos.y - base; // height of vertex (scaled, rotated, etc.)
float frac = I.tc.z*consts.x; // fractional (or rigidity)
float inten = H * dp; // intensity
float2 result = calc_xz_wave (wind.xz*inten, frac);
#ifdef USE_TREEWAVE
result = 0;
result = float2(0);
#endif
float4 f_pos = float4(pos.x+result.x, pos.y, pos.z+result.y, 1);

Expand Down
4 changes: 2 additions & 2 deletions res/gamedata/shaders/gl/hud3d.vs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ v2p_TL _main (v_TL I)

O.Tex0 = I.Tex0;
O.HPos = I.P;
O.P.w = 1;
O.P = mul( m_WVP, O.P );
O.HPos.w = 1;
O.HPos = mul( m_WVP, O.HPos );
return O;
}
2 changes: 2 additions & 0 deletions res/gamedata/shaders/gl/iostructs/v_particle.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ void main()

v2p_particle_tc = O.tc;
v2p_particle_c = O.c;
#ifdef USE_SOFT_PARTICLES
v2p_particle_tctexgen = O.tctexgen;
#endif
gl_Position = O.hpos;
}
Binary file modified res/gamedata/shaders/gl/particle_alphaonly.ps
Binary file not shown.
2 changes: 1 addition & 1 deletion res/gamedata/shaders/gl/shadow_direct_tree.vs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ v2p_shadow_direct _main ( v_shadow_direct I )
float3 pos = mul (m_xform , I.P);

//
float base = m_xform._42; // take base height from matrix
float base = m_xform[3][1]; // take base height from matrix
float dp = calc_cyclic (wave.w+dot(pos,float3(wave)));
float H = pos.y - base; // height of vertex (scaled, rotated, etc.)
float inten = H * dp; // intensity
Expand Down
Binary file modified res/gamedata/shaders/gl/ssao_calc.ps
Binary file not shown.
Binary file modified res/gamedata/shaders/gl/ssao_hbao.ps
Binary file not shown.

0 comments on commit 40c6065

Please sign in to comment.