add hdr flag
This commit is contained in:
parent
81d3a928bf
commit
3396f812ef
@ -848,8 +848,12 @@ impl Image {
|
||||
///
|
||||
/// [`Camera`]: https://docs.rs/bevy/latest/bevy/render/camera/struct.Camera.html
|
||||
/// [`RenderTarget::Image`]: https://docs.rs/bevy/latest/bevy/render/camera/enum.RenderTarget.html#variant.Image
|
||||
pub fn new_target_texture(width: u32, height: u32) -> Self {
|
||||
let format = TextureFormat::bevy_default();
|
||||
pub fn new_target_texture(width: u32, height: u32, hdr: bool) -> Self {
|
||||
let format = if hdr {
|
||||
TEXTURE_FORMAT_HDR
|
||||
} else {
|
||||
TEXTURE_FORMAT_SDR
|
||||
};
|
||||
let size = Extent3d {
|
||||
width,
|
||||
height,
|
||||
|
@ -27,7 +27,7 @@ fn setup(
|
||||
mut images: ResMut<Assets<Image>>,
|
||||
) {
|
||||
// This is the texture that will be rendered to.
|
||||
let image = Image::new_target_texture(512, 512);
|
||||
let image = Image::new_target_texture(512, 512, false);
|
||||
|
||||
let image_handle = images.add(image);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user