From 741ca844a9f90697d5a5f010502d60ef7313d651 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:25:24 -0500 Subject: [PATCH] update code comment --- .../windows/assets/shaders/directx/include/base_vs.hlsl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl b/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl index d6c384d535f..a7f44b70962 100644 --- a/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl +++ b/src_assets/windows/assets/shaders/directx/include/base_vs.hlsl @@ -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; } }