This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adjusts UV and UV2 vectors based on provided uv_scale | |
void adjust_uv_scale(input_data &input, godot::Vector4 uv_scale) { | |
// If the uv_scale is an empty/default vector, no adjustment is necessary. | |
if (uv_scale == godot::Vector4()) | |
return; | |
// Adjust UV coordinates | |
for (auto &uv : input.uvs) { | |
// The UV is shifted from a [0.5,1] range to [0,0.5] and then scaled according to the uv_scale.x and uv_scale.y. | |
// see: godot/servers/rendering_server.cpp:718 (line number might change obviously) |