Rotate entire screen without image trailing
Hi guys--
I'm wondering if someone can edit the existing rotation pixel shaders (there are a couple out there) or devise a new one that will eliminate the image trailing that occurs when you rotate the entire frame in runtime.
Is it possible for the shader to draw from information that lies outside of the window, so that when the frame is rotated, previously out-of-range data comes in to fill the current gaps? I've attached an example of the problem, and if fixed it would simply look like the "camera" were being rotated around.
Thanks!
Example
Re: Rotate entire screen without image trailing
Its not possible to draw information from outside the frame. Everything not shown on your frame is a black abyss that isn't rendered. So that is why rotating causes the corners to appear black.
What you *can* do is have your frame be larger than your window, and then rotate the frame while showing only the portion in the window. You will need a window of size 0.707 * frame size. For example, a 512x512 frame would be shown in a 362x362 window.
Another alternative is to use a pixel shader to simply stretch the image on the frame to these same proportions. This would show the same area, but stretch the image.
I have pixel shader examples of both of these you can feel free to use. The modified pixel shader you'd want you can find in this zip:
https://sites.google.com/site/claniraq/stuff/PT_RotateFullScreen.zip?attredirects=0&d=1
You can see it in use here:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=203073&page=1
Re: Rotate entire screen without image trailing
Thanks Pixelthief-- that's what I was afraid of. The modified shader you supplied should work pretty well, as I would need to rotate the screen only for select modes in the game. A slight zoom-in wouldn't detract from the gameplay.
Your game looks pretty cool, btw!
Re: Rotate entire screen without image trailing
Pixelthief, there is some way to rotate a 16:9 screen without deform the image?
Re: Rotate entire screen without image trailing
Only by using tricks to actually draw a 16:16 screen and only show 16:9 of it.
Re: Rotate entire screen without image trailing
Quote:
Originally Posted by Dynasoft
Only by using tricks to actually draw a 16:16 screen and only show 16:9 of it.
Yep. Its just logical. If you rotate a 16:9 image, it will be 9:16.
Re: Rotate entire screen without image trailing
Wouldn't it be neat anyway to have the window self-resize (easy), or to have the window itself rotate? (I've done this but Looki removed the feature from his extension that allowed it)
Re: Rotate entire screen without image trailing
Quote:
Originally Posted by LB
Wouldn't it be neat anyway to have the window self-resize (easy), or to have the window itself rotate? (I've done this but Looki removed the feature from his extension that allowed it)
Oh, interesting.
Why he removed it?
Do you still have the one that you modified?
Can you post it? or there is an old post where it's possible to download it?
Re: Rotate entire screen without image trailing
Sorry, no. I hadn't finished it before he removed the feature. :(
Re: Rotate entire screen without image trailing
SOLVED: i just found the 0.7 zoom factor and put it to 0.9. nice! love it even more now (the fx)
thx!!!
Jot
_____________
This is my favorite shader at the moment! I love it Pixel! Is there any whay (maybe inside the code) to NOT zoom in 0.7* in the beginning? I got pretty tough stair effects at my graphic files. I mean the shader works great but i would love the full resolution or maybe a 0.9 times zoom in.
thx!
Jot