is writing a pixel shader hard?
Printable View
is writing a pixel shader hard?
So basically, HWA just keeps framerates smooth even with lots of objects? Nothing really else?
Well besides the addition of pixel shaders, yeah that's it really. It doesn't improve hard programed performance (events) but it defiantly does a hell of a job at sustaining framerate no matter what's graphically going on. :DQuote:
Originally Posted by chrispiss
So all and all, I mean it's nothing stunningly special. It does do exactly what people such as myself, have been waiting years for though... so I welcome it with the widest of open arms.
yea!
Well, semi-transparency is no shader. It's called blend coefficient in HWA. You can combine it with every shader :)Quote:
Originally Posted by Pixelthief
Just so I understand this, you can't use more than one pixel shader on a specific object? Or do you mean more than one pixel shader period?Quote:
Originally Posted by Looki
you can't use more than one pixel shader *per object*. Each object in your game is treated as a polygon, and can only be under a single 'effect' from pixel shaders. However, the blend coefficient isn't an effect, and so you can use both one effect AND semi transparency.
Think of it like the old 'ink effects' in MMF, where you can only have one at at time. Except now semi-transperency is separate, and works with all of them (as does the RGB shift).
The problem is when you want to use more than one effect at a time. Say you want to rotate the screen in your game, by using a 'Rotation' pixel shader. Well then you can't also add a subtraction shader in order to do dynamic lighting, and you can't make it blurry, etc etc etc.
However, you CAN apply one pixel shader to an object in your game, and then ANOTHER pixel shader to your frame itself. And in the next release, you will be able to apply one pixel shader to your entire game window.
But if you want to have a single object affected by more than one shader, unless clickteam implement multipass (which they won't), you need to write your own pixel shaders. Check out the .fx files in your Effects folder to get an idea
One thing to keep in mind though is that you can actually change the pixel shaders at runtime. So you can apply a pixel shader to an object and then change it throughout the course of the game. However like said above, you can only have a single pixel shader on an object at one time.
By the way. I've noticed that if you apply a pixel shader such as Add, to an object, and place it into a layer with a pixel shader, it appears to turn the pixel shader off. So even then, if you want to combine pixel shaders, you need to make a new shader with them both combined.
Thanks for the responses guys. I have one last question. Compared to the regular build off MMF2, aside from the things listed in the download thread by Yves, is the HWA beta a solid build to release stuff with? ie, if you're releasing a final version 1.0 of your game/program or whatever, is it stable enough for the open world, or is it best to stick with the latest update of MMF?
Thanks again
Should be. Games never randomly crashed for me.. there only are some limitations, I think.