Page 1 of 1

Matching effects to sprites

PostPosted: Sun May 11, 2008 8:55 pm
by mikiex
Hi,

I like how construct is going, but I have a question - how would I match an effects (in and FX file) UV's so they match the box around the sprite. So I want to get the world coords from the corners of the box into the shader.

Mhmhm did I explain that bad?

Re: Matching effects to sprites

PostPosted: Sun May 11, 2008 10:32 pm
by Ashley
I think you want the boxLeft/boxTop/boxRight/boxBottom float parameters, which are detailed here.

Re: Matching effects to sprites

PostPosted: Mon May 12, 2008 5:25 pm
by mikiex
[quote="Ashley":137jtkg7]I think you want the boxLeft/boxTop/boxRight/boxBottom float parameters, which are detailed here.[/quote:137jtkg7]

I did try this, i noticed these in the source code. But I was getting strange results.
I'll post a .fx snippet

The idea I had was to generate a procedual replacement of a sprite.
You can easy make things like circles etc.