Merge remote-tracking branch 'origin/master' into add-dirt-to-karts

This commit is contained in:
Benau 2018-09-09 00:58:05 +08:00
commit 33a983a701
2 changed files with 7 additions and 4 deletions

View File

@ -19,7 +19,7 @@ void main()
{
// Triplanar detail map
vec2 xyuv = vec2(world_position.x, world_position.y);
float detail = texture(g_detail_map, uv * 32).r;
float detail = texture(g_detail_map, uv * 32.0).r;
detail *= 2.5;
vec4 col = sampleTextureLayer0(uv);

View File

@ -37,6 +37,8 @@ out vec3 normal;
out vec2 uv;
out vec2 uv_two;
out vec4 color;
out vec4 world_position;
out float camdist;
out float hue_change;
@ -106,7 +108,7 @@ void main()
skinned_normal = joint_matrix * idle_normal;
skinned_tangent = joint_matrix * idle_tangent;
vec4 world_position = getWorldPosition(i_origin, i_rotation, i_scale.xyz,
vec4 v_world_position = getWorldPosition(i_origin, i_rotation, i_scale.xyz,
skinned_position.xyz);
vec3 world_normal = rotateVector(i_rotation, skinned_normal.xyz);
vec3 world_tangent = rotateVector(i_rotation, skinned_tangent.xyz);
@ -123,7 +125,8 @@ void main()
uv_two = i_uv_two;
color = i_color.zyxw;
camdist = length(u_view_matrix * world_position);
camdist = length(u_view_matrix * v_world_position);
hue_change = float(i_misc_data.y) * 0.01;
gl_Position = u_projection_view_matrix * world_position;
gl_Position = u_projection_view_matrix * v_world_position;
world_position = v_world_position;
}