Dear all,
Is it possible to use a pixel shader inside a sprite?
I have create a simple pixel shader, that just writes red color, for
testing.
I have surrounded my Sprite.DrawImage(tex,...) call by the
effect.Begin(...), BeginPass(0), and EndPass(), End(),
but my shader seems not to be used : My texture is drawn just
normally.
...
Using DirectX I'm rendering textured polygons (orthographically) so they act as HUD sprites. Now I'm not sure how would I go about implementing sprite masking in this sytem?
So basically say I have a sprite, how can I make it render only in a given portion of the screen which I define? And if a part of it moves outside this portion of t...
Im currently working on a Python/Pygame module to wrap some basic sprite animation. Animation in the sense that the image itself is static but I apply rotation and scale with start and end values with a sine wave interpolation. That is, sprite transformation like the ones that could be made in Flash. I hope you understand, otherwise feel...
We have an application that show a large image file (satellite image) from local network resource.
To speed up the image rendering, we divide the image to smaller patches (e.g. 6x6 cm) and the app tiles them appropriately.
But each time the satellite image updated, the dividing pre-process should be done, which is a time consuming work.
...
What I am trying to do is create a viewport to view a small portion of a background. (And later put sprites in).
However the problem I have noticed is there seems to be an issue of the background blurring when it starts moving. I was not sure if this is because blitting is slow or because of a problem in the code. I was looking for exam...
Hi, I'm a design student and I'm at the end of my Web design I course. I'm working on my final site, but I'm having trouble with sprites (something we went over in one class, which I followed, but now I can't seem to figure it out). It's the first time I'm trying to use sprites for a site I'm making for the class.
Anyway, I've looked ove...
I am writing a tile-based game engine for the iPhone and it works in general apart from the following glitch. Basically, the camera will always keep the player in the centre of the screen, and it moves to follow the player correctly and draws everything correctly when stationary. However whilst the player is moving, the tiles of the surf...
I have a sprite object in XNA.
It has a size, position and rotation.
How to translate a point from the screen coordinates to the sprite coordinates ?
Thanks,
SW
...
I'm trying to use the Sprite Class in Microsoft.DirectX.Direct3D to draw some sprites to my device.
GameObject go = gameDevice.Objects[x];
SpriteDraw.Draw2D(go.ObjectTexture,
go.CenterPoint,
go.DegreeToRadian(go.Rotation),
go.Position,
Color.White);
GameObject is a class i wrote, in which all the basic information required of a game o...
I need to display texture of image with the rounded shape,my code as follow
texture = Texture.FromBitmap(device,myBitmap, Usage.RenderTarget, Pool.Default);
_sprite.Begin(SpriteFlags.SortTexture | SpriteFlags.DoNotModifyRenderState);
_sprite.Draw(_allocator.Texture, Vector3.Empty, new Vector3(_objectLocation.X, _objectLocation...
Hi all,
I've built a CSS navigation menu using a sprite, very similar to the one on Apple's website. I've got it working fine, such that it changes to the right position on the image on hover and mousedown (all using CSS), but I'm having a hard time figuring out how to make a button stay highlighted once it's clicked. I have a row in my...
private static var tileDir:String;
public static var tileImage:BitmapData;
private static var loader:Loader;
public static var tileReady:EventDispatcher = new EventDispatcher();
public static var tileNum_perRow:Number = 3;
public static var select:selector;
public var tileNum:Numb...
I am making a Sim City like game. There are lots of tiles. When I first started. I was just using a tilesheet. I was copying the necessary pieaces from the tilesheet. on to a blank bitMapData. I then took the bitMapData and put it into a bitMap which I then put into a DisplayObject. It worked great!
tileSheet:BitMapData <----- data i...
I have a sprite of my main character. I normally draw it with a color modulus of ARGB(255,255,255,255). However, I would like my sprite to be drawn more white. I can make the sprite be drawn any color by changing the color modulus, except for white. What can I do? I am using C++ with DirectX9 and using an LPD3DXSPRITE to draw my tex...
Hi, I am trying to do a simple animation on the iPhone and then have it stop once it is finished. The code I am currently using is:
NSArray *imageArray = [[NSArray alloc] initWithObjects:
[UIImage imageNamed:@"init_lay1.png"],
[UIImage imageNamed:@"init_lay2.png"],
...
I need to display image with rounded corner with sprite. What is the best way to do this.
...
Hi everyone, I have a C# snippet code about sprite collision in C# game programming, hope you guys will help me to clarify it.
I dont understand method IsCollided, especially the calculation of d1 and d2 to determine whether the sprites collide or not, the meaning and the use of Matrix Invert() and Multiphy in this case as well as the u...
Can anyone help me make sense of the following?
I create a few squared sprites and then remove the first one
and display the coords.
The result is:
(x=0, y=0, w=208, h=40) 0 208
(x=42, y=0, w=166, h=40) 0 166
The x coordinate is still 0, though width has changed,
getBounds shows correct values.
I would expect x to change as well....
I want code for generating sprite in php . Is there any good code suggestion .
...
I have an XNA game (its a slot machine).
I have some really cool animations my artist made for me that are more or less 1600x1000 and over 50 frames.
For all of the animations so far I have been using sprite sheets. (Where all the frames are in one image file and when its rendered it chooses what part of the image to show).
The proble...