AshiTenshi

I'm cerating 2D game and wondering how to implement scanlines effect. For now i'm using simple .png image colored with scalnines patern and transparency - i simply draw this sprite in front of all other of my sprites, but since the texture is big and uses transparency it seems slow and i have large framerate drop when i'm using it. So i'm asking for help - is there may be other ways to create this effect Thanks.



Re: XNA Framework Scanlines in 2D

Fluxtah

you could try using a screen aligned quad with a shader that does the scanlines, however I have not tried this myself but it should work.





Re: XNA Framework Scanlines in 2D

AshiTenshi

Wery nice idea, but i have no expierence in programming my own shaders . Does it is worth effort to learn it to solove this situation Some tips would be nice ..

P.S Sorry for my bad english, i hope You get the idea





Re: XNA Framework Scanlines in 2D

Fluxtah

The best place to always start to learn something is probably with a book, however if thats not possible then the next best thing to learn shaders is tutorials on the web plus rendermonkey or Nvidia FX Composer.

I prefer rendermonkey because its simpler to use for someone new to shaders, however Nvidia FX Composer is more feature packed and just looks more capable, but I have a book that uses rendermonkey so I got more used to that in the end.

Yes, shaders are well worth the effort! :)

RenderMonkey - http://ati.amd.com/developer/rendermonkey/index.html

FX Composer - http://developer.nvidia.com/object/fx_composer_home.html

For tutorials just do a search for HLSL tutorials, there are plenty aimed at the beginner.