This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Get pixel location from shader


Get pixel location from shader

Postby noaktree » Oct 3, 2005 @ 12:34pm

Hi,

I just found PocketFrog and am interested in the pixel shaders. I see that you can get the color of the source and destination pixels within the shader. Is there an easy way to get the current pixel's screen (x,y) location?

I made this:

If you look at the source you will see that I did a cheap trick to maintain a pixel cursor during a fragment run. This only works with non-masked rectangular sprites though.

Thanks,
Neil
noaktree
 


Postby fast_rx » Oct 3, 2005 @ 1:56pm

I think you'd be better off using a surface lock operation... and it could be faster than using the shader.
User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron