I'm fighting again with a shader XD, in this case i want to modify the radial starfield, this one:
The first wrong thing is that with an empty template i put a sprite, add the shader and the radial appears in the bottom left instead instead the center ¿? .
In the demo of the shader is in the middle so i don't know if with the C2 updates something changed in coordinates but i tried various config on C2 and i was unable to get in the center .
So, i opened the .fx and tried to change various things but only was able to change the Y position, never the X ¿?
I tried to do that here:
vec2 vScreenPos = vScreenUV * 2.0 - 1.0;
vScreenPos.x *= resolution.x / resolution.y;[/code:3gompju2]
And after various hours changing values in all the entire shader nothing, i was able to change everything less that XD.
For my game i want get some kind of parallax/follows the mouse or the hero, so i will need the center of the radial always be in the center of the sprite, then with events i can move it to do some kind of parallax depending of the mouse/hero position.
I guess a X.pos/Y.pos parameter will be the ideal, but with simply get the radial always in the center of the sprite will be enough for me, i can edit after to get what i want.
Gigatron Any idea what is wrong ? :S[/p]
Thanks in advance!