Skip to content

Commit

Permalink
update code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Dec 30, 2024
1 parent 62d3de6 commit 741ca84
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ vertex_t generate_fullscreen_triangle_vertex(uint vertex_id, float2 subsample_of
sin(rotation_radians), cos(rotation_radians) };
float2 rotation_center = { 0.5, 0.5 };
tex_coord = round(rotation_center + mul(rotation_matrix, tex_coord - rotation_center));
/*
bitwise operation used in place of modulus operation as mod operator on integer does not compile optimally generating warnings,
bitwise operation "& 1" is equivalent to "% 2" in a form that results in optimized lower level code.
*/
// Swap the xy offset coordinates if the texture is rotated an odd number of times.
if (rotate_texture_steps & 1) {

subsample_offset.xy = subsample_offset.yx;
}
}
Expand Down

0 comments on commit 741ca84

Please sign in to comment.