Skip to content

Commit b54afed

Browse files
committed
shaders: Switch to floating point texture coordinates in tree shaders.
1 parent daf2abb commit b54afed

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

res/gamedata/shaders/gl/common_iostructs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ struct p_flat
413413
struct v_shadow_direct_aref
414414
{
415415
float4 P ; // POSITION; // (float,float,float,1)
416-
int4 tc ; // TEXCOORD0; // (u,v,frac,???)
416+
float4 tc ; // TEXCOORD0; // (u,v,frac,???)
417417
};
418418

419419
struct v_shadow_direct
@@ -457,7 +457,7 @@ struct v_tree
457457
float4 Nh ; // NORMAL; // (nx,ny,nz)
458458
float3 T ; // TANGENT; // tangent
459459
float3 B ; // BINORMAL; // binormal
460-
int4 tc ; // TEXCOORD0; // (u,v,frac,???)
460+
float4 tc ; // TEXCOORD0; // (u,v,frac,???)
461461
};
462462

463463
////////////////////////////////////////////////////////////////

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout(location = POSITION) in float4 v_tree_P ; // POSITION; // (float,float
55
layout(location = NORMAL) in float4 v_tree_Nh ; // NORMAL; // (nx,ny,nz)
66
layout(location = TANGENT) in float3 v_tree_T ; // TANGENT; // tangent
77
layout(location = BINORMAL) in float3 v_tree_B ; // BINORMAL; // binormal
8-
layout(location = TEXCOORD0) in int4 v_tree_tc ; // TEXCOORD0; // (u,v,frac,???)
8+
layout(location = TEXCOORD0) in float4 v_tree_tc ; // TEXCOORD0; // (u,v,frac,???)
99

1010
#if defined(USE_R2_STATIC_SUN) && !defined(USE_LM_HEMI)
1111
layout(location = TEXCOORD0) out float4 v2p_bumped_tcdh ; // TEXCOORD0; // Texture coordinates, w=sun_occlusion

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout(location = POSITION) in float4 v_tree_P ; // POSITION; // (float,float
55
layout(location = NORMAL) in float4 v_tree_Nh ; // NORMAL; // (nx,ny,nz)
66
layout(location = TANGENT) in float3 v_tree_T ; // TANGENT; // tangent
77
layout(location = BINORMAL) in float3 v_tree_B ; // BINORMAL; // binormal
8-
layout(location = TEXCOORD0) in int4 v_tree_tc ; // TEXCOORD0; // (u,v,frac,???)
8+
layout(location = TEXCOORD0) in float4 v_tree_tc ; // TEXCOORD0; // (u,v,frac,???)
99

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

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

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

44
layout(location = POSITION) in float4 v_shadow_P ; // POSITION; // (float,float,float,1)
55
#ifdef USE_AREF
6-
layout(location = TEXCOORD0) in int4 v_shadow_tc ; // TEXCOORD0; // (u,v,frac,???)
6+
layout(location = TEXCOORD0) in float4 v_shadow_tc ; // TEXCOORD0; // (u,v,frac,???)
77
#endif // USE_AREF
88

99
#ifdef USE_AREF

0 commit comments

Comments
 (0)