FFP examples?

hey people - was wondering if there were some FFP examples available? The simple stuff such as combining some color and sampler is fine (such as the wiki page with the vColor * Diffuse) … but what about modulating vertices and uv’s?
If someone could point to some references even (not necessarily Unity related?) on how to achieve such effects with FFP?

(this is for use on iPhone!) :slight_smile:

cheers!

There is no way to achieve such things in FFP for vertices.

FFP allows you to set basic texture blending operations which in unity is done through the shaderlab combiner functionality, but thats it.

If you want to alter vertex / uv stuff, you need to do it on the mesh.

hey dreamora - ok, so for example, having flag sway (just simple sine function) would be done by adjusting vertex data each frame? what sort of cost does this incur when done through Unity? That’s locking/unlocking the ib/vb each frame isn’t it? This can get slow each frame when you’re working directly with DirectX to make these calls… how does this scale having to make the calls from Unitys scripting engine? …add to that, running on an iPhone! :slight_smile:

…I’m assuming it’s the same deal with uv’s then, has to be done through code?

edit: and just to add, I’m assuming I should look into doing this using: Unity - Scripting API: Mesh ?

The performance highly depends on the target system and the amount of vertices.
Its definitely doable though.

Can’t comment on the cost for doing it in C# / JS, as I’ve no comparision through a plugin.

UVs depend a bit on what you want to do. if it is just texture move rotate and scale, then you can adjust it through the material settings.