Skip to content

Commit 63a089c

Browse files
committed
shaders: Switch to floating point texture coordinates in detail shaders.
1 parent a954329 commit 63a089c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

res/gamedata/shaders/gl/common_iostructs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ struct v_tree
465465
struct v_detail
466466
{
467467
float4 pos ; // POSITION; // (float,float,float,1)
468-
int4 misc ; // TEXCOORD0; // (u(Q),v(Q),frac,matrix-id)
468+
float4 misc ; // TEXCOORD0; // (u(Q),v(Q),frac,matrix-id)
469469
};
470470

471471
#endif // common_iostructs_h_included

res/gamedata/shaders/gl/deffer_detail_s_flat.vs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ v2p_flat _main (v_detail v)
1212
{
1313
v2p_flat O;
1414
// index
15-
int i = v.misc.w;
15+
int i = int(v.misc.w);
1616
float4 m0 = array[i+0];
1717
float4 m1 = array[i+1];
1818
float4 m2 = array[i+2];

res/gamedata/shaders/gl/deffer_detail_w_flat.vs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ v2p_flat _main (v_detail v)
1414
{
1515
v2p_flat O;
1616
// index
17-
int i = v.misc.w;
17+
int i = int(v.misc.w);
1818
float4 m0 = array[i+0];
1919
float4 m1 = array[i+1];
2020
float4 m2 = array[i+2];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
out gl_PerVertex { vec4 gl_Position; };
33

44
layout(location = POSITION) in float4 v_detail_pos ; // POSITION; // (float,float,float,1)
5-
layout(location = TEXCOORD0) in int4 v_detail_misc ; // TEXCOORD0; // (u(Q),v(Q),frac,matrix-id)
5+
layout(location = TEXCOORD0) in float4 v_detail_misc ; // TEXCOORD0; // (u(Q),v(Q),frac,matrix-id)
66

77
#if defined(USE_R2_STATIC_SUN) && !defined(USE_LM_HEMI)
88
layout(location = TEXCOORD0) out float4 v2p_flat_tcdh ; // TEXCOORD0; // Texture coordinates, w=sun_occlusion

0 commit comments

Comments
 (0)