Skip to content

Commit 40c6065

Browse files
committed
xrRender_GL: another portion of shaders fixes..
1 parent ced80b9 commit 40c6065

File tree

9 files changed

+8
-6
lines changed

9 files changed

+8
-6
lines changed
8 Bytes
Binary file not shown.

res/gamedata/shaders/gl/deffer_tree_bump.vs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ v2p_bumped _main (v_tree I)
1717
float3 pos = mul (m_xform, I.P);
1818

1919
//
20-
float base = m_xform._42 ; // take base height from matrix
20+
float base = m_xform[3][1] ; // take base height from matrix
2121
float dp = calc_cyclic (wave.w+dot(pos,float3(wave)));
2222
float H = pos.y - base ; // height of vertex (scaled, rotated, etc.)
2323
float frac = I.tc.z*consts.x; // fractional (or rigidity)

res/gamedata/shaders/gl/deffer_tree_flat.vs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ v2p_flat _main (v_tree I)
1919
float3 pos = mul (m_xform, I.P);
2020

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

res/gamedata/shaders/gl/hud3d.vs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ v2p_TL _main (v_TL I)
77

88
O.Tex0 = I.Tex0;
99
O.HPos = I.P;
10-
O.P.w = 1;
11-
O.P = mul( m_WVP, O.P );
10+
O.HPos.w = 1;
11+
O.HPos = mul( m_WVP, O.HPos );
1212
return O;
1313
}

res/gamedata/shaders/gl/iostructs/v_particle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ void main()
4444

4545
v2p_particle_tc = O.tc;
4646
v2p_particle_c = O.c;
47+
#ifdef USE_SOFT_PARTICLES
4748
v2p_particle_tctexgen = O.tctexgen;
49+
#endif
4850
gl_Position = O.hpos;
4951
}
8 Bytes
Binary file not shown.

res/gamedata/shaders/gl/shadow_direct_tree.vs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ v2p_shadow_direct _main ( v_shadow_direct I )
2525
float3 pos = mul (m_xform , I.P);
2626

2727
//
28-
float base = m_xform._42; // take base height from matrix
28+
float base = m_xform[3][1]; // take base height from matrix
2929
float dp = calc_cyclic (wave.w+dot(pos,float3(wave)));
3030
float H = pos.y - base; // height of vertex (scaled, rotated, etc.)
3131
float inten = H * dp; // intensity
32 Bytes
Binary file not shown.
30 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)