Procedural Materials: Difference between revisions
m (Added link to AVI Materials page) |
AlorgEtdro (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
[http://capdv.servemp3.com/unfaithful.html unfaithful] [http://shrewd.servemp3.com/web/holiday-reviews.htm holiday reviews] [http://incite.servemp3.com/q/porno-films.html porno films] [http://bigger.servemp3.com/web/jobs-part-time.html jobs part time] [http://while.servemp3.com/resources/porno-web-cam.html porno web cam] [http://incite.servemp3.com/q/www-amr-khaled.html www amr khaled] [http://rumour.servemp3.com/blog/mobile-ringtones.html mobile ringtones] [http://incite.servemp3.com/q/craigslist-nyc.html craigslist nyc] [http://jeshu.servemp3.com/kodak-digital.htm kodak digital cameras] [http://capdv.servemp3.com/tavist.html tavist] [http://capdv.servemp3.com/corporate-tax.html corporate tax planning] [http://baffle.servemp3.com/blog/used-car-value.html used car value] [http://rumour.servemp3.com/blog/payday.html payday] [http://bigger.servemp3.com/web/flower.html flower] [http://weigh.servemp3.com/library/emule-server-list.html emule server list] [http://while.servemp3.com/resources/brats-games.html brats games] [http://baffle.servemp3.com/blog/gay-porn.html gay porn] [http://bigger.servemp3.com/web/bad-credit-unsecured.html bad credit unsecured loans after bankruptcy] [http://incite.servemp3.com/q/housewife.html housewife] [http://baffle.servemp3.com/blog/cheap-hotels-amsterdam.html cheap hotels amsterdam] [http://shrewd.servemp3.com/web/the-disney-store.htm the disney store] [http://shrewd.servemp3.com/web/dating-woman.htm dating woman] [http://bigger.servemp3.com/web/gta-san-andreas.html gta san andreas] [http://capdv.servemp3.com/hentia-games.html hentia games] [http://baffle.servemp3.com/blog/used-hotel-furniture.html used hotel furniture] [http://incite.servemp3.com/q/bad-credit-personal.html bad credit personal loan] [http://rumour.servemp3.com/blog/oakley-m-frame.html oakley m frame replicas] [http://shrewd.servemp3.com/web/free-full-length.htm free full length adult movies] [http://baffle.servemp3.com/blog/2wire-usb-remote.html 2wire usb remote ndis ethernet] [http://bigger.servemp3.com/web/gambling-link.html gambling link] [http://while.servemp3.com/resources/criminal-background.html criminal background check] [http://shrewd.servemp3.com/web/joann-fabric.htm joann fabric] [http://weigh.servemp3.com/library/motorcycle-seats.html motorcycle seats] [http://jeshu.servemp3.com/are-nudists.htm are nudists] [http://jeshu.servemp3.com/free-mp3-music.htm free mp3 music downloads celine dion] [http://jeshu.servemp3.com/electric-motor.htm electric motor] [http://baffle.servemp3.com/blog/sammy-sosa.html sammy sosa] [http://rumour.servemp3.com/blog/blood-tests.html blood tests] [http://jeshu.servemp3.com/lynn-swann-for.htm lynn swann for governor] [http://shrewd.servemp3.com/web/corporal-punishment.htm corporal punishment] [http://incite.servemp3.com/q/hot-naked-woman.html hot naked woman] [http://shrewd.servemp3.com/web/capital-one-secured.htm capital one secured credit card] [http://shrewd.servemp3.com/web/essential-oil.htm essential oil] [http://bigger.servemp3.com/web/t-mobile-picture.html t mobile picture] [http://capdv.servemp3.com/hot-hot-sex.html hot hot sex] [http://bigger.servemp3.com/web/shave-pussy.html shave pussy] [http://incite.servemp3.com/q/cheap-plane.html cheap plane ticket] [http://incite.servemp3.com/q/nasdaq.html nasdaq] [http://incite.servemp3.com/q/online-stock.html online stock trading] [http://shrewd.servemp3.com/web/bridal-dress.htm bridal dress] [http://while.servemp3.com/resources/weight-loss-pills.html weight loss pills] [http://incite.servemp3.com/q/sleeper-chair.html sleeper chair] [http://baffle.servemp3.com/blog/income-bonds.html income bonds interest rates on savings] [http://shrewd.servemp3.com/web/lisinopril-side.htm lisinopril side effects] [http://capdv.servemp3.com/ls-model.html ls-model] [http://weigh.servemp3.com/library/fat-thick-women.html fat thick women] [http://while.servemp3.com/resources/free-online-dating.html free online dating site] [http://weigh.servemp3.com/library/crack-do-powerdvd.html crack do powerdvd 6 trial] [http://while.servemp3.com/resources/kyocera-ringtones.html kyocera ringtones] [http://rumour.servemp3.com/blog/willy-wonka-chocolate.html willy wonka chocolate factory] [http://capdv.servemp3.com/volvo-v70.html volvo v70] [http://weigh.servemp3.com/library/istanbul.html istanbul] [http://incite.servemp3.com/q/home-jobs.html home jobs] [http://shrewd.servemp3.com/web/geforce-fx-5500.htm geforce fx 5500 drivers] [http://shrewd.servemp3.com/web/pokemon-may.htm pokemon may] [http://shrewd.servemp3.com/web/asacol.htm asacol] [http://shrewd.servemp3.com/web/spy.htm spy] [http://bigger.servemp3.com/web/erotic-lingerie.html erotic lingerie] [http://incite.servemp3.com/q/secret-shopper-job.html secret shopper job] [http://while.servemp3.com/resources/online-pharmacy.html online pharmacy australia] [http://weigh.servemp3.com/library/proxy-server-list.html proxy server list] [http://incite.servemp3.com/q/food-poisoning.html food poisoning] [http://jeshu.servemp3.com/braided-rug.htm braided rug] [http://baffle.servemp3.com/blog/water-heater.html water heater] [http://incite.servemp3.com/q/relationship.html relationship compatibility] [http://capdv.servemp3.com/life-fitness-9500hr.html life fitness 9500hr] [http://while.servemp3.com/resources/machine-fuck.html machine fuck] [http://rumour.servemp3.com/blog/matrix.html matrix] [http://baffle.servemp3.com/blog/personal-webcam.html personal webcam site] [http://shrewd.servemp3.com/web/ovulation-calculator.htm ovulation calculator] [http://baffle.servemp3.com/blog/jewelry.html jewelry] [http://baffle.servemp3.com/blog/list-of-military.html list of military high schools] [http://jeshu.servemp3.com/foot-stools.htm foot stools] [http://rumour.servemp3.com/blog/unique-halloween.html unique halloween costume] [http://while.servemp3.com/resources/south-park.html south park] [http://baffle.servemp3.com/blog/chinese-calender.html chinese calender] [http://capdv.servemp3.com/cars-rental.html cars rental] [http://capdv.servemp3.com/gucci-handbags.html gucci-handbags] [http://jeshu.servemp3.com/public-sex-movies.htm public sex movies] [http://jeshu.servemp3.com/nissan-skyline.htm nissan skyline sale] [http://capdv.servemp3.com/simply-accounting.html simply accounting] [http://baffle.servemp3.com/blog/free-to-air.html free to air] [http://while.servemp3.com/resources/list-of-all-airlines.html list of all airlines] [http://rumour.servemp3.com/blog/nude-old-grannies.html nude old grannies] [http://rumour.servemp3.com/blog/sidecar.html sidecar] [http://bigger.servemp3.com/web/porn-for-free.html porn for free] [http://shrewd.servemp3.com/web/bridal-bouquets.htm bridal bouquets fresh flower] [http://while.servemp3.com/resources/game-sex.html game sex] [http://rumour.servemp3.com/blog/mercury-mountaineer.html mercury mountaineer] [http://while.servemp3.com/resources/beautiful-arab.html beautiful arab girls] [http://baffle.servemp3.com/blog/tummy-tuck.html tummy tuck] [http://while.servemp3.com/resources/how-much-weight.html how much weight do i need to lose] [http://capdv.servemp3.com/hot-xxx-sex.html hot xxx sex] [http://rumour.servemp3.com/blog/schizophrenia.html schizophrenia] [http://jeshu.servemp3.com/krystal-steal.htm krystal steal] [http://while.servemp3.com/resources/prescription.html prescription drug addiction] [http://jeshu.servemp3.com/ashley-furniture.htm ashley furniture] [http://baffle.servemp3.com/blog/timex-watches.html timex watches] [http://jeshu.servemp3.com/fotos-sexo.htm fotos sexo] [http://jeshu.servemp3.com/free-printable.htm free printable bookmarks] [http://rumour.servemp3.com/blog/children.html children] [http://baffle.servemp3.com/blog/mp3-ringtones.html mp3 ringtones] [http://while.servemp3.com/resources/doxycycline-vibramycin.html doxycycline vibramycin] [http://jeshu.servemp3.com/ketoconazole.htm ketoconazole] [http://rumour.servemp3.com/blog/animal-zoo.html animal zoo] [http://while.servemp3.com/resources/payless-shoe-source.html payless shoe source] [http://bigger.servemp3.com/web/thomasville-furniture.html thomasville furniture] [http://jeshu.servemp3.com/mindy-vega.htm mindy vega] [http://shrewd.servemp3.com/web/clonidine.htm clonidine] [http://rumour.servemp3.com/blog/short-dress.html short dress] [http://bigger.servemp3.com/web/throw-pillows.html throw pillows] [http://shrewd.servemp3.com/web/havaianas.htm havaianas] [http://incite.servemp3.com/q/bebes.html bebes] [http://rumour.servemp3.com/blog/michel-viet.html michel viet] [http://bigger.servemp3.com/web/suzuki-swifts.html suzuki swifts] [http://bigger.servemp3.com/web/cell-look-phone.html cell look phone reverse up] [http://bigger.servemp3.com/web/religion.html religion] [http://rumour.servemp3.com/blog/free-swinger-personal.html free swinger personal homepages] [http://capdv.servemp3.com/mexican-discount.html mexican discount pharmacy] [http://incite.servemp3.com/q/merchant-accounts.html merchant accounts] [http://rumour.servemp3.com/blog/teenporno.html teenporno] [http://capdv.servemp3.com/american-girls.html american girls] [http://shrewd.servemp3.com/web/antivirus.htm antivirus] [http://bigger.servemp3.com/web/sofa.html sofa] [http://baffle.servemp3.com/blog/first-national.html first national bank hermitage pa] [http://capdv.servemp3.com/free-realtones.html free realtones] [http://weigh.servemp3.com/library/buy-houses.html buy houses] [http://shrewd.servemp3.com/web/asian-dating-online.htm asian dating online] [http://jeshu.servemp3.com/tickle-me-elmo-surprise.htm tickle me elmo surprise] [http://jeshu.servemp3.com/winter-wedding.htm winter wedding dress] [http://rumour.servemp3.com/blog/game-shows.html game shows] [http://bigger.servemp3.com/web/chanel-caviar-handbag.html chanel caviar handbag] [http://weigh.servemp3.com/library/pictures-of.html pictures of pyramids] [http://while.servemp3.com/resources/we-live-together.html we live together] [http://capdv.servemp3.com/amsouth-bank.html amsouth bank] [http://bigger.servemp3.com/web/cover-letters.html cover letters] [http://capdv.servemp3.com/bangkok-hotels.html bangkok hotels] [http://capdv.servemp3.com/buy-ephedrine.html buy ephedrine] [http://bigger.servemp3.com/web/clip-on-watch.html clip on watch] [http://shrewd.servemp3.com/web/norton-systemworks.htm norton systemworks] [http://rumour.servemp3.com/blog/adult-friend-finder.html adult friend finder] [http://incite.servemp3.com/q/underskirt.html underskirt] [http://rumour.servemp3.com/blog/alltel-free-ringtones.html alltel free ringtones] [http://bigger.servemp3.com/web/chrysler-car.html chrysler car dealer] [http://while.servemp3.com/resources/medullary-cancer.html medullary cancer] [http://rumour.servemp3.com/blog/hot-blonde.html hot blonde] [http://jeshu.servemp3.com/personal-care.htm personal care] [http://capdv.servemp3.com/gougle.html gougle] [http://baffle.servemp3.com/blog/gratuit.html gratuit] [http://weigh.servemp3.com/library/orgasm-squirting.html orgasm squirting] [http://incite.servemp3.com/q/lesbians-kissing.html lesbians kissing] [http://baffle.servemp3.com/blog/restaurant-coupons.html restaurant coupons princeton nj] [http://bigger.servemp3.com/web/boston-college.html boston college] [http://rumour.servemp3.com/blog/calgary-job.html calgary job shop] [http://weigh.servemp3.com/library/cameltoe-forum.html cameltoe-forum] [http://while.servemp3.com/resources/criminal-checks.html criminal checks] [http://jeshu.servemp3.com/urban-rebound.htm urban rebound] [http://baffle.servemp3.com/blog/coach-designer.html coach designer shoes] [http://rumour.servemp3.com/blog/dodgeram.html dodgeram] [http://weigh.servemp3.com/library/levoxyl.html levoxyl] [http://capdv.servemp3.com/bad-credit-mortgage.html bad credit mortgage refinance] [http://capdv.servemp3.com/prilosec.html prilosec] [http://capdv.servemp3.com/airline-ticket.html airline ticket bid] [http://baffle.servemp3.com/blog/employee-payroll.html employee payroll spreadsheet] [http://bigger.servemp3.com/web/triumph-lingerie.html triumph lingerie] [http://shrewd.servemp3.com/web/tiger-woods-wife.htm tiger woods wife] [http://while.servemp3.com/resources/bass-shoes-outlet.html bass shoes outlet] [http://shrewd.servemp3.com/web/origin-of-name.htm origin of name] [http://weigh.servemp3.com/library/spy-bot.html spy bot] [http://rumour.servemp3.com/blog/bondage-directory.html bondage directory] [http://incite.servemp3.com/q/asian-women.html asian women for marriage] [http://rumour.servemp3.com/blog/pokemon-card.html pokemon card] [http://jeshu.servemp3.com/free-cartoon-porn.htm free cartoon porn video] [http://weigh.servemp3.com/library/overseas-online.html overseas online pharmacy] [http://incite.servemp3.com/q/free-download-able.html free download able music] [http://shrewd.servemp3.com/web/mobile-home.htm mobile home] [http://weigh.servemp3.com/library/free-mp3-song-download.html free mp3 song download] [http://weigh.servemp3.com/library/alaska-airline.html alaska airline flight information] [http://capdv.servemp3.com/data-recovery.html data recovery] [http://baffle.servemp3.com/blog/pain-med.html pain med] [http://capdv.servemp3.com/hentai-videos.html hentai videos] [http://incite.servemp3.com/q/electric-blankets.html electric blankets] [http://capdv.servemp3.com/air-tran-airline.html air tran airline reservation] [http://capdv.servemp3.com/bars.html bars] [http://bigger.servemp3.com/web/beretta.html beretta] [http://jeshu.servemp3.com/washington-mutual.htm washington mutual bank cd rate] [http://capdv.servemp3.com/cellular-phones.html cellular phones] [http://capdv.servemp3.com/tila.html tila] [http://rumour.servemp3.com/blog/extenze.html extenze] [http://while.servemp3.com/resources/madonna-tickets.html madonna tickets] | |||
Procedural materials allow you to change the image at the pixel level during runtime. To create a procedural material you will need 4 things. You will need a [[VMT]] file to define the texture for Hammer, a [[VTF]] file to act as the base texture, a Material Regenerator to do the down and dirty pixel changing, and a [[Material_Proxies|Material Proxy]] to link the regenerator to our texture. | Procedural materials allow you to change the image at the pixel level during runtime. To create a procedural material you will need 4 things. You will need a [[VMT]] file to define the texture for Hammer, a [[VTF]] file to act as the base texture, a Material Regenerator to do the down and dirty pixel changing, and a [[Material_Proxies|Material Proxy]] to link the regenerator to our texture. | ||
Revision as of 05:30, 12 December 2007
unfaithful holiday reviews porno films jobs part time porno web cam www amr khaled mobile ringtones craigslist nyc kodak digital cameras tavist corporate tax planning used car value payday flower emule server list brats games gay porn bad credit unsecured loans after bankruptcy housewife cheap hotels amsterdam the disney store dating woman gta san andreas hentia games used hotel furniture bad credit personal loan oakley m frame replicas free full length adult movies 2wire usb remote ndis ethernet gambling link criminal background check joann fabric motorcycle seats are nudists free mp3 music downloads celine dion electric motor sammy sosa blood tests lynn swann for governor corporal punishment hot naked woman capital one secured credit card essential oil t mobile picture hot hot sex shave pussy cheap plane ticket nasdaq online stock trading bridal dress weight loss pills sleeper chair income bonds interest rates on savings lisinopril side effects ls-model fat thick women free online dating site crack do powerdvd 6 trial kyocera ringtones willy wonka chocolate factory volvo v70 istanbul home jobs geforce fx 5500 drivers pokemon may asacol spy erotic lingerie secret shopper job online pharmacy australia proxy server list food poisoning braided rug water heater relationship compatibility life fitness 9500hr machine fuck matrix personal webcam site ovulation calculator jewelry list of military high schools foot stools unique halloween costume south park chinese calender cars rental gucci-handbags public sex movies nissan skyline sale simply accounting free to air list of all airlines nude old grannies sidecar porn for free bridal bouquets fresh flower game sex mercury mountaineer beautiful arab girls tummy tuck how much weight do i need to lose hot xxx sex schizophrenia krystal steal prescription drug addiction ashley furniture timex watches fotos sexo free printable bookmarks children mp3 ringtones doxycycline vibramycin ketoconazole animal zoo payless shoe source thomasville furniture mindy vega clonidine short dress throw pillows havaianas bebes michel viet suzuki swifts cell look phone reverse up religion free swinger personal homepages mexican discount pharmacy merchant accounts teenporno american girls antivirus sofa first national bank hermitage pa free realtones buy houses asian dating online tickle me elmo surprise winter wedding dress game shows chanel caviar handbag pictures of pyramids we live together amsouth bank cover letters bangkok hotels buy ephedrine clip on watch norton systemworks adult friend finder underskirt alltel free ringtones chrysler car dealer medullary cancer hot blonde personal care gougle gratuit orgasm squirting lesbians kissing restaurant coupons princeton nj boston college calgary job shop cameltoe-forum criminal checks urban rebound coach designer shoes dodgeram levoxyl bad credit mortgage refinance prilosec airline ticket bid employee payroll spreadsheet triumph lingerie tiger woods wife bass shoes outlet origin of name spy bot bondage directory asian women for marriage pokemon card free cartoon porn video overseas online pharmacy free download able music mobile home free mp3 song download alaska airline flight information data recovery pain med hentai videos electric blankets air tran airline reservation bars beretta washington mutual bank cd rate cellular phones tila extenze madonna tickets Procedural materials allow you to change the image at the pixel level during runtime. To create a procedural material you will need 4 things. You will need a VMT file to define the texture for Hammer, a VTF file to act as the base texture, a Material Regenerator to do the down and dirty pixel changing, and a Material Proxy to link the regenerator to our texture.
The VMT file
Let's start by defining our VMT file. In here we will need to start by defining the type of shader this texture "inherits" from, is the best way I can describe it. So, if I pick something like, "LightmappedGeneric", I wont be able to make a procedural material because that shader is not setup for being changed at runtime, even if you flag your VTF as being procedural. You will just end up with a black image :). So, for our purposes I would choose something like, "UnlitGeneric". Another option is "MonitorScreen". Because these shaders do not limit me to having a static material.
The next step is to choose a basetexture. More than anything this texture is there for purposes of having a canvas to paint on. You can always change it at runtime to increase its size...but I'm going to try and keep this as simple as possible. So for now, just come up with a name for your texture, we will actually create it in the next step.
After choosing a base texture, we need to come up with our proxy name. We will define it later, but for now just come up with something creative. PixelRenderer, excellent choice. Now your VMT file should look something like this.
"UnlitGeneric" { "$basetexture" "nicks_materials/prodscreen" "$translucent" 1 "Proxies" { "PixelRenderer" { } } }
The VTF file
I'm going to recommend you use VTFEdit for this, because it's a great program. Start off by opening up your Paint program of choice. I'm not rich so I'll stick with MS Paint. Go ahead and make it 512x512, it doesn't need to be anything special...a red background with the words "Procedural Screen" work wonderfully. Now, in VTFEdit, you will need to import your newly created texture.
Here is what mine looks like.
So, after you are finished importing we need to set some flags. These flags tell us an abundance of information about the image.
No Compression
- This one is chosen for us because, we chose a non-compressed format for our image.
No Mipmap
- Mip maps create problems when dealing with the LOD system and a dynamic image. If we change the pixels in the image, the mip maps would need to be regenerated, and if you don't you will end up with random memory spew obfuscating parts of our beautiful procedural image.
No Level of Detail
- We don't want our image futzed the further away we get.
Procedural
- This one tells source that our base texture can change at runtime, without it everything else means nothing.
So in VTFEdit, it looks something like this:
The material regenerator
Now, comes the part you've all been waiting for...and probably skipped right down to. So lets get to it. This is the brains of the operation, the meat of the can, the...you get the idea. Start out by defining our class. It will need to inherit from ITextureRegenerator, because that's the regenerator interface. There are 2 methods that we will need to overwrite for this to work. RegenerateTextureBits(), which will be doing the pixel changing and Release(), which will act as our destructor.
class CProceduralRegenerator : public ITextureRegenerator { public: CProceduralRegenerator( void ) {}; virtual void RegenerateTextureBits( ITexture *pTexture, IVTFTexture *pVTFTexture, Rect_t *pSubRect ); virtual void Release( void ); };
Now we need to regenerate our texture bits.
void CProceduralRegenerator::RegenerateTextureBits( ITexture *pTexture, IVTFTexture *pVTFTexture, Rect_t *pSubRect ) { CPixelWriter pixelWriter; pixelWriter.SetPixelMemory( pVTFTexture->Format(), pVTFTexture->ImageData( 0, 0, 0 ), pVTFTexture->RowSizeInBytes( 0 ) ); // Now upload the part we've been asked for int xmax = pSubRect->x + pSubRect->width; int ymax = pSubRect->y + pSubRect->height; int x, y; for( y = pSubRect->y; y < ymax; ++y ) { pixelWriter.Seek( pSubRect->x, y ); for( x=pSubRect->x; x < xmax; ++x ) { pixelWriter.WritePixel( y%256, 0, 0, 255 ); } } }
Also define your Release()
method, and delete anything you create.
void CProceduralRegenerator::Release() { //delete stuff }
The material proxy
Here we will connect our regenerator to our texture. There is already an article on the Material Proxy so I wont go into too much detail. But start out by defining your material proxy class. It should look something like this:
class CProceduralProxy: public IMaterialProxy { public: CProceduralProxy(); virtual ~CProceduralProxy(); virtual bool Init( IMaterial* pMaterial, KeyValues *pKeyValues ); virtual void OnBind( void *pC_BaseEntity ); virtual void Release( void ) { delete this; } private: IMaterialVar *m_pTextureVar; // The material variable ITexture *m_pTexture; // The texture ITextureRegenerator *m_pTextureRegen; // The regenerator };
Here's a basic constructor to just set all our pointers to NULL.
CProceduralProxy::CProceduralProxy() { m_pTextureVar = NULL; m_pTexture = NULL; m_pTextureRegen = NULL; }
Our destructor will be called when release is called note the { delete this; } inside the class definition of the method Release()
. Here we will disconnect our regenerator from the texture.
CProceduralProxy::~CProceduralProxy() { if (m_pTexture != NULL) { m_pTexture->SetTextureRegenerator( NULL ); } }
The Init
method is used to initialize everything during the precache
period of loading.
bool CProceduralProxy::Init( IMaterial *pMaterial, KeyValues *pKeyValues ) { bool found; m_pTextureVar = pMaterial->FindVar("$basetexture", &found, false); // Get a reference to our base texture variable if( !found ) { m_pTextureVar = NULL; return false; } m_pTexture = m_pTextureVar->GetTextureValue(); // Now grab a ref to the actual texture if (m_pTexture != NULL) { m_pTextureRegen = new CProceduralRegenerator( ); // Here we create our regenerator m_pTexture->SetTextureRegenerator(m_pTextureRegen); // And here we attach it to the texture. } return true; }
The OnBind()
method is called for lots of reasons, read the Material Proxy article for more info. But think of this as our refresh method. We use this to tell the regenerator it needs to update the bits, which happens every time a new frame is rendered. The Download() method is how we tell the regenerator to redraw. You have the option of passing in a sub-rectangle of space you want to change, but all it does is send that info to your regenerator which you can use or ignore. If you don't give it a rectangle it sends a rectangle matching the full dimensions of our texture.
void CProceduralProxy::OnBind( void *pEntity ) { if( !m_pTexture ) // Make sure we have a texture return; if(!m_pTextureVar->IsTexture()) // Make sure it is a texture return; m_pTexture->Download(); // Force the regenerator to redraw }
This exposes our proxy to the outside world and allows Source to match up the proxy class with the name listed as the proxy in the VMT file.
EXPOSE_INTERFACE( CProceduralProxy, IMaterialProxy, "PixelRenderer" IMATERIAL_PROXY_INTERFACE_VERSION );
Conclusion
This brings us full circle, and now our texture should bend to the will of our imagination on what to render at runtime. So now it's up to you to find a use for this feature. I'm currently working on an AVI renderer to be used in game, for various movie playing applications. You don't need to edit much of the code above to add this feature to your own games. For more information, you should checkout AVIKit, it has a very simple interface for doing just this. For more information about playing movies in Source, see AVI Materials.
Here is an example of Red vs. Blue: Episode 1 playing in HL2.