Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.4 kB
3
Indexable
Never
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index af025dc..30dc30a 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -970,7 +970,7 @@ void RendererStorageRD::texture_2d_placeholder_initialize(RID p_texture) {
 	//for now to get it working
 	Ref<Image> image;
 	image.instantiate();
-	image->create(4, 4, false, Image::FORMAT_RGBA8);
+	image->create(4, 4, false, Image::FORMAT_RGBAH);
 	image->fill(Color(1, 0, 1, 1));
 
 	texture_2d_initialize(p_texture, image);
@@ -981,7 +981,7 @@ void RendererStorageRD::texture_2d_layered_placeholder_initialize(RID p_texture,
 	//for now to get it working
 	Ref<Image> image;
 	image.instantiate();
-	image->create(4, 4, false, Image::FORMAT_RGBA8);
+	image->create(4, 4, false, Image::FORMAT_RGBAH);
 	image->fill(Color(1, 0, 1, 1));
 
 	Vector<Ref<Image>> images;
@@ -1002,7 +1002,7 @@ void RendererStorageRD::texture_3d_placeholder_initialize(RID p_texture) {
 	//for now to get it working
 	Ref<Image> image;
 	image.instantiate();
-	image->create(4, 4, false, Image::FORMAT_RGBA8);
+	image->create(4, 4, false, Image::FORMAT_RGBAH);
 	image->fill(Color(1, 0, 1, 1));
 
 	Vector<Ref<Image>> images;
@@ -1011,7 +1011,7 @@ void RendererStorageRD::texture_3d_placeholder_initialize(RID p_texture) {
 		images.push_back(image);
 	}
 
-	texture_3d_initialize(p_texture, Image::FORMAT_RGBA8, 4, 4, 4, false, images);
+	texture_3d_initialize(p_texture, Image::FORMAT_RGBAH, 4, 4, 4, false, images);
 }
 
 Ref<Image> RendererStorageRD::texture_2d_get(RID p_texture) const {
@@ -7622,9 +7622,9 @@ void RendererStorageRD::_update_render_target(RenderTarget *rt) {
 		return;
 	}
 	//until we implement support for HDR monitors (and render target is attached to screen), this is enough.
-	rt->color_format = RD::DATA_FORMAT_R8G8B8A8_UNORM;
-	rt->color_format_srgb = RD::DATA_FORMAT_R8G8B8A8_SRGB;
-	rt->image_format = rt->flags[RENDER_TARGET_TRANSPARENT] ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8;
+	rt->color_format = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
+	rt->color_format_srgb = RD::DATA_FORMAT_R16G16B16A16_SFLOAT;
+	rt->image_format = rt->flags[RENDER_TARGET_TRANSPARENT] ? Image::FORMAT_RGBAH : Image::FORMAT_RGBH;
 
 	RD::TextureFormat rd_format;
 	RD::TextureView rd_view;