Rename input variables
This commit is contained in:
parent
dbc3cd5ff5
commit
62e0effed6
@ -19,7 +19,7 @@ layout(location = 9) in vec4 i_rotation;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
layout(location = 10) in vec4 i_scale;
|
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)
|
#if defined(Use_Bindless_Texture)
|
||||||
layout(location = 13) in uvec4 i_bindless_texture_0;
|
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;
|
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
|
||||||
uv = i_uv;
|
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;
|
gl_Position = u_projection_view_matrix * world_position;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ layout(location = 9) in vec4 i_rotation;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
layout(location = 10) in vec4 i_scale;
|
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"
|
#stk_include "utils/get_world_location.vert"
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ void main()
|
|||||||
vec4 skinned_position = vec4(0.0);
|
vec4 skinned_position = vec4(0.0);
|
||||||
vec4 skinned_normal = vec4(0.0);
|
vec4 skinned_normal = vec4(0.0);
|
||||||
vec4 skinned_tangent = 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++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
|
@ -25,8 +25,8 @@ layout(location = 9) in vec4 i_rotation;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
layout(location = 10) in vec4 i_scale;
|
layout(location = 10) in vec4 i_scale;
|
||||||
layout(location = 11) in vec2 i_misc_data;
|
layout(location = 11) in vec2 i_texture_trans;
|
||||||
layout(location = 12) in ivec2 i_misc_data_two;
|
layout(location = 12) in ivec2 i_misc_data;
|
||||||
|
|
||||||
#if defined(Use_Bindless_Texture)
|
#if defined(Use_Bindless_Texture)
|
||||||
layout(location = 13) in uvec4 i_bindless_texture_0;
|
layout(location = 13) in uvec4 i_bindless_texture_0;
|
||||||
@ -102,12 +102,12 @@ void main()
|
|||||||
).xyz;
|
).xyz;
|
||||||
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
|
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
|
||||||
|
|
||||||
uv = vec2(i_uv.x + (i_misc_data.x * i_normal.w),
|
uv = vec2(i_uv.x + (i_texture_trans.x * i_normal.w),
|
||||||
i_uv.y + (i_misc_data.y * i_normal.w));
|
i_uv.y + (i_texture_trans.y * i_normal.w));
|
||||||
uv_two = i_uv_two;
|
uv_two = i_uv_two;
|
||||||
|
|
||||||
color = i_color.zyxw;
|
color = i_color.zyxw;
|
||||||
camdist = length(u_view_matrix * world_position);
|
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;
|
gl_Position = u_projection_view_matrix * world_position;
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@ layout(location = 9) in vec4 i_rotation;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
layout(location = 10) in vec4 i_scale;
|
layout(location = 10) in vec4 i_scale;
|
||||||
layout(location = 11) in vec2 i_misc_data;
|
layout(location = 11) in vec2 i_texture_trans;
|
||||||
layout(location = 12) in ivec2 i_misc_data_two;
|
layout(location = 12) in ivec2 i_misc_data;
|
||||||
|
|
||||||
#if defined(Use_Bindless_Texture)
|
#if defined(Use_Bindless_Texture)
|
||||||
layout(location = 13) in uvec4 i_bindless_texture_0;
|
layout(location = 13) in uvec4 i_bindless_texture_0;
|
||||||
@ -102,7 +102,7 @@ void main()
|
|||||||
vec4 skinned_position = vec4(0.0);
|
vec4 skinned_position = vec4(0.0);
|
||||||
vec4 skinned_normal = vec4(0.0);
|
vec4 skinned_normal = vec4(0.0);
|
||||||
vec4 skinned_tangent = 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++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
@ -145,12 +145,12 @@ void main()
|
|||||||
).xyz;
|
).xyz;
|
||||||
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
|
normal = (u_view_matrix * vec4(world_normal, 0.0)).xyz;
|
||||||
|
|
||||||
uv = vec2(i_uv.x + (i_misc_data.x * i_normal.w),
|
uv = vec2(i_uv.x + (i_texture_trans.x * i_normal.w),
|
||||||
i_uv.y + (i_misc_data.y * i_normal.w));
|
i_uv.y + (i_texture_trans.y * i_normal.w));
|
||||||
uv_two = i_uv_two;
|
uv_two = i_uv_two;
|
||||||
|
|
||||||
color = i_color.zyxw;
|
color = i_color.zyxw;
|
||||||
camdist = length(u_view_matrix * world_position);
|
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;
|
gl_Position = u_projection_view_matrix * world_position;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ layout(location = 9) in vec4 i_rotation;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
layout(location = 10) in vec4 i_scale;
|
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)
|
#if defined(Use_Bindless_Texture)
|
||||||
layout(location = 13) in uvec4 i_bindless_texture_0;
|
layout(location = 13) in uvec4 i_bindless_texture_0;
|
||||||
@ -80,7 +80,7 @@ void main()
|
|||||||
|
|
||||||
vec4 idle_position = vec4(i_position, 1.0);
|
vec4 idle_position = vec4(i_position, 1.0);
|
||||||
vec4 skinned_position = vec4(0.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++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
|
@ -415,7 +415,7 @@ void SPMeshBuffer::recreateVAO(unsigned i)
|
|||||||
glEnableVertexAttribArray(10);
|
glEnableVertexAttribArray(10);
|
||||||
glVertexAttribPointer(10, 4, GL_HALF_FLOAT, GL_FALSE, 32, (void*)16);
|
glVertexAttribPointer(10, 4, GL_HALF_FLOAT, GL_FALSE, 32, (void*)16);
|
||||||
glVertexAttribDivisorARB(10, 1);
|
glVertexAttribDivisorARB(10, 1);
|
||||||
// Misc data (texture translation)
|
// Texture translation
|
||||||
glEnableVertexAttribArray(11);
|
glEnableVertexAttribArray(11);
|
||||||
glVertexAttribPointer(11, 2, GL_HALF_FLOAT, GL_FALSE, 32, (void*)24);
|
glVertexAttribPointer(11, 2, GL_HALF_FLOAT, GL_FALSE, 32, (void*)24);
|
||||||
glVertexAttribDivisorARB(11, 1);
|
glVertexAttribDivisorARB(11, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user