Could you please add the ability to zoom layers in and out?
Thanks.
Printable View
Could you please add the ability to zoom layers in and out?
Thanks.
Yeah, it would be great... Or an extension that is able to zoom screen :)
It will be possible with HWA thanks to the pixel shaders and the parameters modified in runtime. ;)
Now thats really good news, this is needed seriously :D
IMHO zoom isn't a task for a pixel shader. It will then render unnecessary parts of the screen. It should probably be in a vertex shader (which isn't available to 3rd party people like us).
Also zoom in a pixel shader gives lower quality graphics. With a proper zoom feature it will look just as good zoomed in than it does not zoomed at all.
A bit like when they "enhance image" on Spooks? ;)Quote:
Originally Posted by Andos
Presumably you mean when zooming from 0.5 to 1 or something :D
IMHO zoom isn't a task for a pixel shader. It will then render unnecessary parts of the screen. It should probably be in a vertex shader (which isn't available to 3rd party people like us).
>> IMHO, with the unified shader architecture the modern graphic cards have, I think it will be the same processing time in both pixel/vertex shaders. But I agree that in theory, a pixel shader will take more memory and so more processing time than a vertex shader.
Also zoom in a pixel shader gives lower quality graphics. With a proper zoom feature it will look just as good zoomed in than it does not zoomed at all.
>> I think the result will be exactly the same for both cases. If the texture is scaled 2x through a pixel shader it's like scale it 2x by the card processing (with the same filtering).
I think too that a pixel shader could be better than a vertex shader for a zoom effect since a lot of different kind of filters can be done through a pixel shader (from the default one to a HQ2x one)
:)
Err, zooming in from 1:1 isn't a good idea imo. A zoom where one pixel of an object represent one pixel on the screen should be the maximum zoom level which you zoom into, not the point which you start from. If you zoom out from that, you'll still have full quality, but zooming in from 1:1 and using some resampling algorithm to attempt to restore the quality loss... That's just plain wrong.
I've already done a basic pixel shader to zoom in and out and it works pretty well. Currently, it zoom from the upper left corner but I'll update it soon. ;)
Sounds very cool :D
I think any zoom feature would be useful although how could you enforce a vertex shader when MMF2 uses raster images?Quote:
A bit like when they "enhance image" on Spooks? (that thing with the grenade has got to be totally impossible!!)
Well you know that only applies if you NEED that quality. If it's something like a puff of smoke, it doesn't matter.Quote:
Originally Posted by Nifflas
I reckon that a zoom vertex shader probably would be more efficient, and it would filter all of the textures nicely too, although that is all possible with pixel, just probably less efficient.
Zooming in from 1:1 would be ok for some games. For example if you don't have a black 1 pixel outline around everything it would look ok. However I think if I were to request layer zoom I would also request scaled textures for objects: Say you have a backdrop that you want to zoom in on from 1:1. You add a high res texture and check the box "texture scaling" before you resized it to the correct size for in game use. Then in your application, it would be using the high res texture, but scaled down, so if you zoomed in beyond 1:1 then it would still look good.
I've finished some new pixel shaders. A lot more are planned (it's so funny to make a pixel shader). :)
The pixel shader for Zooming In and Out works pretty well but, of course, it zoom in and out only the image of an object, not the object itself (like the texture of a square, the texture is scaled but not the square). It's fast and useful for layers.
I've done too a pixel shader for rotation. I'll create another one for doing both (pan+zoom+rotate). :)
For information: I've already created 28 pixel shaders (some are like others). I think I'll create 20 more and release a package to let you test them. :D
Thats sounds nice, but i meant moving the camera/screen closer or further away from the frame, like along the Z axis. But MMF is not 3d so i don;t know if this is possible?
I'm looking forward to trying the shaders though. :)
Moving along a Z-axis is like zooming in and out in a 2D game so if you apply my pixel shader for Zooming In and Out on a layer, it will do exactly what you want.
No less, no more. :D
Cool! Sphax, how's the pixel shader compatibility with DX 8 at this moment?
I'm currently testing my pixel shaders with Direct3D9...
EDIT1: None of them currently works with D3D8... :D I'll search why.
EDIT2: Ok I see why... I don't know anything in the pixel shader language for D3D8 (mines are all programmed in HLSL), so my Pixel shaders will not be available for it currently. :(
I am really looking forward to your PS pack, Sphax. They really are powerful and so, MMF2 HWA is obviously about more than just speed and object increases.
There is a whole new world of great visual effects ahead. Users should find the results very interesting and games will start to look different/better in many ways.
On no, don't say that. lol.Quote:
EDIT1: None of them currently works with D3D8... I'll search why.
EDIT2: Ok I see why... I don't know anything in the pixel shader language for D3D8 (mines are all programmed in HLSL), so my Pixel shaders will not be available for it currently.
I was going to use directX 8 because my game is for the casual market.
I don't think Sphax will be porting them any time soon- D3D8 pixel shaders are written in a language similar to ASM :)
Jam is right. :)
what would you need layer zooming for?
That could be useful to create some nice looking effects. For example thanks to pixel shaders, it will be possible to shake the screen on both X,Y and Z axis when a bomb explode. ;)
ah, ye, thats cool!
I see.. thanks Jam and Sphax for the responses. I guess it'd be good to let us, users, know what pixel shader we can use with DX9 only, if not all of them.
You could even use rotate to do that as well, increase the effect :P.
Zooming and Rotating the screen is something I've wanted for a long time, on a layer specific basis is even better!
Really looking forward to all these shaders :)
So am I! I can't imagine anything neater than a large library of useful shaders!
See this post ;)
Yes, this will be displayed in the Effects List dialog box in a next version.Quote:
I guess it'd be good to let us, users, know what pixel shader we can use with DX9 only, if not all of them.