2 Attachment(s)
Sub-Pixel Positioning Pixel Shader
I've made a sub-pixel positioning pixel shader for you all.
It includes an example file.
For those of you who don't know what sub-pixel positioning is: Sub-pixel positioning is a way to make the motion of slow moving, low res objects appear smoother. What it does is it effectively makes it so you can position an object at decimal coordinates (13.5,16.7 for example), and to visually display that, what it does is it sort of bleeds into the adjacent pixels. Just check out the example file, it visually explains it much better than words can.
Re: Sub-Pixel Positioning Pixel Shader
Awesome! Completely awesome! Thanks a whole lot for sharing!
Re: Sub-Pixel Positioning Pixel Shader
NOOOOOOOOO!!!!
WHY I DIDN'T SHARE MINE??
Great work, glad there are more people who SHARE their shaders, unlike me -.-
Just a bit angry cause I've already made a subpx shader some weeks ago. =P
Re: Sub-Pixel Positioning Pixel Shader
Upload yours now then! :D I can't wait to try out more custom ones!
Re: Sub-Pixel Positioning Pixel Shader
It's probably exactly the same code as mine. The GPU does all the math work for us, unlike the next PS I'm working on, a rotational blur.
Re: Sub-Pixel Positioning Pixel Shader
That my friend is awesome, now if only we could pile multiple pixel shaders onto each other. Like this with Add or Subtract. This is great though, I love it. Thumbs up!
Re: Sub-Pixel Positioning Pixel Shader
This pixel shader should be inbuild in all of MMF2's active objects.
Re: Sub-Pixel Positioning Pixel Shader
That would be a strange workaround. There's no problem about displaying an object at a sub-pixel position (and to do it the most effective way, a pixel shader should not be used). The problem is that positions are stored in integers, as Yves said, changing that is a very extensive process. Using a 'sub pixel shader' will not make that easier.
Re: Sub-Pixel Positioning Pixel Shader
Or it might just be easier to make it so that we could pile on multiple pixel shaders. :)
Re: Sub-Pixel Positioning Pixel Shader
Quote:
Originally Posted by Nifflas
That would be a strange workaround. There's no problem about displaying an object at a sub-pixel position (and to do it the most effective way, a pixel shader should not be used). The problem is that positions are stored in integers, as Yves said, changing that is a very extensive process. Using a 'sub pixel shader' will not make that easier.
Well yes I completely agree. I only made this so we can get this sort of functionality until that day comes.
If you want to pile on multiple pixel shaders, if the situation is just right, you might be able to apply one to the object, and another to the layer it's on. But that's probably REALLY inefficient.
The hard way is to just copy and paste code from pixel shaders into one big super shader. If we don't get built in sub pixel positioning soon, that's exactly what I'm going to have to do.
Re: Sub-Pixel Positioning Pixel Shader
I would like to know whether Clickteam is planning to allow multiple pixel shaders in the future
Re: Sub-Pixel Positioning Pixel Shader
Not in MMF2. An honestly, it's not really needed since you can merge the pixel shaders yourself or with an help. Also, applying more than only one pixel shader to an object will always be slower than using only one pixel shader for badder result.
Re: Sub-Pixel Positioning Pixel Shader
You sort of can. What you can do is apply a pixel shader to an object, then apply another to the layer the object is on. It's not quite the same, but it's still something.
Re: Sub-Pixel Positioning Pixel Shader
Quote:
Originally Posted by Sphax
An honestly, it's not really needed since you can merge the pixel shaders yourself or with an help.
yeah, but if you wanted to apply anywhere from 1 to 4 effects on an object at once; instead of just being able to enable/disable the 4 shaders individually, you'd have to make a separate shader for every possible combination of those four, like: A, B, C, D, A + B, A + C, etc
i realize it's likely too late to add multiple shaders to MMF2, but even though combining shaders is a simple and usually fast solution, it's not always practical
Re: Sub-Pixel Positioning Pixel Shader
I thought simple and fast was the definition of practical.
Re: Sub-Pixel Positioning Pixel Shader
Well, obviously we can't get it all at the same time. If MMF would came with all features we wanted, it would never be finished :(
I rather have the finished HWA version earlier than having this feature though...