mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-28 00:44:10 +00:00
Make Upload Texture node resolution-aware (#2018)
* Make UploadTextureNode resolution aware * Add TextureFrame implementations for MonitorNode * Add TextureFrame implementation to TransformNode
This commit is contained in:
parent
2d86fb24ab
commit
d2f791cfb3
4 changed files with 14 additions and 2 deletions
|
@ -911,8 +911,13 @@ async fn render_texture<'a: 'n>(_: (), footprint: Footprint, image: impl Node<Fo
|
|||
}
|
||||
|
||||
#[node_macro::node(category(""))]
|
||||
async fn upload_texture<'a: 'n>(_: (), input: ImageFrame<Color>, executor: &'a WgpuExecutor) -> TextureFrame {
|
||||
async fn upload_texture<'a: 'n, F: Copy + Send + Sync + 'n>(
|
||||
#[implementations((), Footprint)] footprint: F,
|
||||
#[implementations(() -> ImageFrame<Color>, Footprint -> ImageFrame<Color>)] input: impl Node<F, Output = ImageFrame<Color>>,
|
||||
executor: &'a WgpuExecutor,
|
||||
) -> TextureFrame {
|
||||
// let new_data: Vec<RGBA16F> = input.image.data.into_iter().map(|c| c.into()).collect();
|
||||
let input = input.eval(footprint).await;
|
||||
let new_data = input.image.data.into_iter().map(SRGBA8::from).collect();
|
||||
let new_image = Image {
|
||||
width: input.image.width,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue