HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Software / Tools > Programming, Coding, (Web)Design


Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people.

Reply
 
Thread Tools
Old Aug 17, 2005, 07:35 PM   #1
DriverHeaven Newbie
 
Join Date: Aug 2005
Posts: 2
Rep Power: 0
jimmy99 is on a distinguished road

do SMARTSHADERs know what pixel they are altering?

Hey!

Im just getting my feet wet into writing SMARTSHADERs. Your tutorial page has been a huge help so far.

I see that you can get the height and width of the current window, and also that conditionals are supported. I understand that the shader program will run for every pixel to be displayed. Can the SMARTSHADER program get the information as to what pixel it is currently altering?

What i wanted to setup was different effects being seperated on the screen at the same time. Something along the lines of:

if (currentPixel < width / 2)
doEffect1;
else
doEffect2;

in essance there'd be a vertical line seperating the 2 effects on the screen. effect1 on the left and effect2 on the right.

So is there some command that will return this info rather than my fictional currentPixel? Thanks!
jimmy99 is offline   Reply With Quote


Reply

Thread Tools