Go Back   DriverHeaven.net > Forums > Software / Tools > Programming, Coding, (Web)Design

Notices

Reply
 
LinkBack Thread Tools Display Modes
Old Aug 17, 2005, 01:35 PM   #1 (permalink)
jimmy99
DriverHeaven Newbie
 
Join Date: Aug 2005
Posts: 2
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

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump




 

 
Powered by: vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Artwork by Allan 'Zardon' Campbell, vBulletin implementation by Craig '5320' Humphreys based on original artwork by Ratchet.

All times are GMT -5. The time now is 06:11 PM. Copyright ©2008 DriverHeaven.net