Skip to content

Commit

Permalink
Cherry pick billboard fix from github godotengine#75462
Browse files Browse the repository at this point in the history
  • Loading branch information
cridenour committed Apr 7, 2023
1 parent 7a0977c commit d7796c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void vertex_shader(in uint instance_index, in bool is_multimesh, in uint multime
vertex = mat3(matrix) * vertex;
model_origin = double_add_vec3(model_origin, model_precision, matrix[3].xyz, vec3(0.0), model_precision);
}
vertex = mat3(model_matrix) * vertex;
vertex = mat3(inv_view_matrix * modelview) * vertex;
vec3 temp_precision; // Will be ignored.
vertex += double_add_vec3(model_origin, model_precision, scene_data.inv_view_matrix[3].xyz, view_precision, temp_precision);
vertex = mat3(scene_data.view_matrix) * vertex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,6 @@ void main() {
#CODE : VERTEX
}

/* output */

// using local coordinates (default)
#if !defined(SKIP_TRANSFORM_USED) && !defined(VERTEX_WORLD_COORDS_USED)

Expand All @@ -361,7 +359,7 @@ void main() {
vertex = mat3(matrix) * vertex;
model_origin = double_add_vec3(model_origin, model_precision, matrix[3].xyz, vec3(0.0), model_precision);
}
vertex = mat3(model_matrix) * vertex;
vertex = mat3(inv_view_matrix * modelview) * vertex;
vec3 temp_precision;
vertex += double_add_vec3(model_origin, model_precision, scene_data.inv_view_matrix[3].xyz, view_precision, temp_precision);
vertex = mat3(scene_data.view_matrix) * vertex;
Expand Down

0 comments on commit d7796c6

Please sign in to comment.