Skip to content

Commit

Permalink
shaders: Switch to floating point texture coordinates in detail shaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Mar 24, 2016
1 parent a954329 commit 63a089c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion res/gamedata/shaders/gl/common_iostructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ struct v_tree
struct v_detail
{
float4 pos ; // POSITION; // (float,float,float,1)
int4 misc ; // TEXCOORD0; // (u(Q),v(Q),frac,matrix-id)
float4 misc ; // TEXCOORD0; // (u(Q),v(Q),frac,matrix-id)
};

#endif // common_iostructs_h_included
2 changes: 1 addition & 1 deletion res/gamedata/shaders/gl/deffer_detail_s_flat.vs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ v2p_flat _main (v_detail v)
{
v2p_flat O;
// index
int i = v.misc.w;
int i = int(v.misc.w);
float4 m0 = array[i+0];
float4 m1 = array[i+1];
float4 m2 = array[i+2];
Expand Down
2 changes: 1 addition & 1 deletion res/gamedata/shaders/gl/deffer_detail_w_flat.vs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ v2p_flat _main (v_detail v)
{
v2p_flat O;
// index
int i = v.misc.w;
int i = int(v.misc.w);
float4 m0 = array[i+0];
float4 m1 = array[i+1];
float4 m2 = array[i+2];
Expand Down
2 changes: 1 addition & 1 deletion res/gamedata/shaders/gl/iostructs/v_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
out gl_PerVertex { vec4 gl_Position; };

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

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

0 comments on commit 63a089c

Please sign in to comment.