update render_to_texture example
This commit is contained in:
parent
7112566300
commit
a2b7a08a05
@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
use std::f32::consts::PI;
|
use std::f32::consts::PI;
|
||||||
|
|
||||||
use bevy::{image::TEXTURE_FORMAT_SDR, prelude::*, render::view::RenderLayers};
|
use bevy::{
|
||||||
|
prelude::*,
|
||||||
|
render::{render_resource::TextureFormat, view::RenderLayers},
|
||||||
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
App::new()
|
App::new()
|
||||||
@ -27,7 +30,7 @@ fn setup(
|
|||||||
mut images: ResMut<Assets<Image>>,
|
mut images: ResMut<Assets<Image>>,
|
||||||
) {
|
) {
|
||||||
// This is the texture that will be rendered to.
|
// This is the texture that will be rendered to.
|
||||||
let image = Image::new_target_texture(512, 512, TEXTURE_FORMAT_SDR);
|
let image = Image::new_target_texture(512, 512, TextureFormat::bevy_default());
|
||||||
|
|
||||||
let image_handle = images.add(image);
|
let image_handle = images.add(image);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user