-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RenderingServer.texture_2d_update_partial() missing #65762
Comments
Does that mean we could do |
I've been looking at the source code to see what happens and if there is an equivalent for Godot 4. In Godot 3, it looks like the call to It looks like the equivalent function for Vulkan is |
cc @clayjohn |
Unless I'm misreading the code, it looks like a fix to this would be exposing an area rect as a new argument to the function, using that in the Then it would just be a case of exposing this to the higher level interfaces in a similar way to how it already is through The only thing that makes me doubt this solution is the logic that deals with compressed images. |
I think the Godot 3 version did not support compressed images either. Although compressed images are usually not present in use cases for this function. Or if that was actually needed, I think VRAM compressed formats use blocks of pixels, so perhaps it would work if the specified sub-rectangle is a multiple of block size. |
I've had a look through |
Is there any progress on this? |
This comment was marked as off-topic.
This comment was marked as off-topic.
@SlashScreen Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
Godot version
4.0.alpha17.official
System information
Windows 10, Vulkan.
Issue description
VisualServer in Godot3 has texture_set_data_partial() function for performance reasons instead of texture_set_data. It is used prominently in Zyllan Terrain. Godot 4 is missing such a function, exposing only the original full image override via RenderingServer.texture_2d_update().
I suspect Godot 4 still needs a function similar to RenderingServer.texture_2d_update_partial()
original implementation in Godot 3.06 and above:
● void texture_set_data_partial(texture: RID, image: Image, src_x: int, src_y: int, src_w: int, src_h: int, dst_x: int, dst_y: int, dst_mip: int, layer: int = 0)
Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly.
@Zylann
Steps to reproduce
Not needed.
Minimal reproduction project
Not needed.
The text was updated successfully, but these errors were encountered: