Rename input variables

This commit is contained in:
Benau 2017-12-27 12:31:21 +08:00
parent dbc3cd5ff5
commit 62e0effed6
6 changed files with 18 additions and 18 deletions

View File

@ -19,7 +19,7 @@ layout(location = 9) in vec4 i_rotation;
#endif
layout(location = 10) in vec4 i_scale;
layout(location = 12) in ivec2 i_misc_data_two;
layout(location = 12) in ivec2 i_misc_data;
#if defined(Use_Bindless_Texture)
layout(location = 13) in uvec4 i_bindless_texture_0;
@ -86,6 +86,6 @@ void main()
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
uv = i_uv;
hue_change = float(i_misc_data_two.y) * 0.01;
hue_change = float(i_misc_data.y) * 0.01;
gl_Position = u_projection_view_matrix * world_position;
}

View File

@ -25,7 +25,7 @@ layout(location = 9) in vec4 i_rotation;
#endif
layout(location = 10) in vec4 i_scale;
layout(location = 12) in ivec2 i_misc_data_two;
layout(location = 12) in ivec2 i_misc_data;
#stk_include "utils/get_world_location.vert"
@ -48,7 +48,7 @@ void main()
vec4 skinned_position = vec4(0.0);
vec4 skinned_normal = vec4(0.0);
vec4 skinned_tangent = vec4(0.0);
int skinning_offset = i_misc_data_two.x;
int skinning_offset = i_misc_data.x;
for (int i = 0; i < 4; i++)
{

View File

@ -25,8 +25,8 @@ layout(location = 9) in vec4 i_rotation;
#endif
layout(location = 10) in vec4 i_scale;
layout(location = 11) in vec2 i_misc_data;
layout(location = 12) in ivec2 i_misc_data_two;
layout(location = 11) in vec2 i_texture_trans;
layout(location = 12) in ivec2 i_misc_data;
#if defined(Use_Bindless_Texture)
layout(location = 13) in uvec4 i_bindless_texture_0;
@ -102,12 +102,12 @@ void main()
).xyz;
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
uv = vec2(i_uv.x + (i_misc_data.x * i_normal.w),
i_uv.y + (i_misc_data.y * i_normal.w));
uv = vec2(i_uv.x + (i_texture_trans.x * i_normal.w),
i_uv.y + (i_texture_trans.y * i_normal.w));
uv_two = i_uv_two;
color = i_color.zyxw;
camdist = length(u_view_matrix * world_position);
hue_change = float(i_misc_data_two.y) * 0.01;
hue_change = float(i_misc_data.y) * 0.01;
gl_Position = u_projection_view_matrix * world_position;
}

View File

@ -32,8 +32,8 @@ layout(location = 9) in vec4 i_rotation;
#endif
layout(location = 10) in vec4 i_scale;
layout(location = 11) in vec2 i_misc_data;
layout(location = 12) in ivec2 i_misc_data_two;
layout(location = 11) in vec2 i_texture_trans;
layout(location = 12) in ivec2 i_misc_data;
#if defined(Use_Bindless_Texture)
layout(location = 13) in uvec4 i_bindless_texture_0;
@ -102,7 +102,7 @@ void main()
vec4 skinned_position = vec4(0.0);
vec4 skinned_normal = vec4(0.0);
vec4 skinned_tangent = vec4(0.0);
int skinning_offset = i_misc_data_two.x;
int skinning_offset = i_misc_data.x;
for (int i = 0; i < 4; i++)
{
@ -145,12 +145,12 @@ void main()
).xyz;
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
uv = vec2(i_uv.x + (i_misc_data.x * i_normal.w),
i_uv.y + (i_misc_data.y * i_normal.w));
uv = vec2(i_uv.x + (i_texture_trans.x * i_normal.w),
i_uv.y + (i_texture_trans.y * i_normal.w));
uv_two = i_uv_two;
color = i_color.zyxw;
camdist = length(u_view_matrix * world_position);
hue_change = float(i_misc_data_two.y) * 0.01;
hue_change = float(i_misc_data.y) * 0.01;
gl_Position = u_projection_view_matrix * world_position;
}

View File

@ -20,7 +20,7 @@ layout(location = 9) in vec4 i_rotation;
#endif
layout(location = 10) in vec4 i_scale;
layout(location = 12) in ivec2 i_misc_data_two;
layout(location = 12) in ivec2 i_misc_data;
#if defined(Use_Bindless_Texture)
layout(location = 13) in uvec4 i_bindless_texture_0;
@ -80,7 +80,7 @@ void main()
vec4 idle_position = vec4(i_position, 1.0);
vec4 skinned_position = vec4(0.0);
int skinning_offset = i_misc_data_two.x;
int skinning_offset = i_misc_data.x;
for (int i = 0; i < 4; i++)
{

View File

@ -415,7 +415,7 @@ void SPMeshBuffer::recreateVAO(unsigned i)
glEnableVertexAttribArray(10);
glVertexAttribPointer(10, 4, GL_HALF_FLOAT, GL_FALSE, 32, (void*)16);
glVertexAttribDivisorARB(10, 1);
// Misc data (texture translation)
// Texture translation
glEnableVertexAttribArray(11);
glVertexAttribPointer(11, 2, GL_HALF_FLOAT, GL_FALSE, 32, (void*)24);
glVertexAttribDivisorARB(11, 1);