Saving an upscaled texture
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Saving an upscaled texture
Hello fellow developers! Lets say I have an image 16x16, I want to upscale it to 256x256 using bilinear interpolation (like you can in love.graphics.draw) but then I want to save the new upscaled image so I can pass it to a shader. I can't seem to find a way to upscale imagedata outside of love.graphics.draw, is there any way to get the upscaled image into imagedata?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Saving an upscaled texture
You can't (easily) turn it into ImageData, but you can use a Canvas.
Re: Saving an upscaled texture
Why do you need to pass the upscaled image to a shader as opposed to the normal one? Can't you just let the shader do the interpolation?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Saving an upscaled texture
uhm, doesn't OpenGL do it for you either way? If you just have a 'blank' shader that samples your texture, it shoul use the bilinear sampling method set with :setFilter too.
Re: Saving an upscaled texture
oof... didn't even think about that haha, that would've been easier.s-ol wrote: ↑Sat Oct 07, 2017 1:57 amuhm, doesn't OpenGL do it for you either way? If you just have a 'blank' shader that samples your texture, it shoul use the bilinear sampling method set with :setFilter too.
Who is online
Users browsing this forum: No registered users and 5 guests