From 81c6f73109ca2a94e4b3b6738ee1cf0551303897 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Mon, 1 Aug 2022 11:59:14 +1000 Subject: Changed storage structs to private --- servers/rendering/renderer_rd/effects/vrs.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'servers/rendering/renderer_rd/effects') diff --git a/servers/rendering/renderer_rd/effects/vrs.cpp b/servers/rendering/renderer_rd/effects/vrs.cpp index fa0b99fef9..68cfd43d90 100644 --- a/servers/rendering/renderer_rd/effects/vrs.cpp +++ b/servers/rendering/renderer_rd/effects/vrs.cpp @@ -146,10 +146,11 @@ void VRS::update_vrs_texture(RID p_vrs_fb, RID p_render_target) { if (vrs_mode == RS::VIEWPORT_VRS_TEXTURE) { RID vrs_texture = texture_storage->render_target_get_vrs_texture(p_render_target); if (vrs_texture.is_valid()) { - Texture *texture = texture_storage->get_texture(vrs_texture); - if (texture) { + RID rd_texture = texture_storage->texture_get_rd_texture(vrs_texture); + int layers = texture_storage->texture_get_layers(vrs_texture); + if (rd_texture.is_valid()) { // Copy into our density buffer - copy_vrs(texture->rd_texture, p_vrs_fb, texture->layers > 1); + copy_vrs(rd_texture, p_vrs_fb, layers > 1); } } } else if (vrs_mode == RS::VIEWPORT_VRS_XR) { @@ -157,10 +158,12 @@ void VRS::update_vrs_texture(RID p_vrs_fb, RID p_render_target) { if (interface.is_valid()) { RID vrs_texture = interface->get_vrs_texture(); if (vrs_texture.is_valid()) { - Texture *texture = texture_storage->get_texture(vrs_texture); - if (texture) { + RID rd_texture = texture_storage->texture_get_rd_texture(vrs_texture); + int layers = texture_storage->texture_get_layers(vrs_texture); + + if (rd_texture.is_valid()) { // Copy into our density buffer - copy_vrs(texture->rd_texture, p_vrs_fb, texture->layers > 1); + copy_vrs(rd_texture, p_vrs_fb, layers > 1); } } } -- cgit v1.2.3