Pete´s Messageboard... No ISO/BIOS requests!

Homepage Members Register Login Search Old board


Neuer Thread ...


AuthorTopics » Book an abo for this threadClose Thread Move Thread Fix the thread Print view Delete this thread

<Luigi>
unregistried

...   Created on 27.01.2005 - 16:27Jump to top Quote this post Report this post Edit Delete


I have written this program taking example from SMARTSHADER Blur.pss.
should work on all dx9 cards.

gpuPeteOGL2.vp:

!!ARBvp1.0
OPTION ARB_position_invariant;
MOV result.texcoord[ 0 ],vertex.texcoord[ 0 ];
END

gpuPeteOGL2.fp:

!!ARBfp1.0

PARAM offset = program.env[1];
PARAM const00 = {0.25, 0.25, 0.25, 0.0};
PARAM const01 = {0.5, 0.5, 0.5, 0.0};

TEMP texCoord00;
TEMP texCoord01;
TEMP texCoord02;
TEMP texCoord10;
TEMP texCoord11;
TEMP texCoord12;
TEMP texCoord20;
TEMP texCoord21;
TEMP texCoord22;

TEMP pixel;

ADD texCoord00.x,-offset.x, fragment.texcoord[0].x;
ADD texCoord00.y,-offset.y, fragment.texcoord[0].y;
MOV texCoord01.x, fragment.texcoord[0].x;
ADD texCoord01.y,-offset.y, fragment.texcoord[0].y;
ADD texCoord02.x, offset.x, fragment.texcoord[0].x;
ADD texCoord02.y,-offset.y, fragment.texcoord[0].y;
ADD texCoord10.x,-offset.x, fragment.texcoord[0].x;
MOV texCoord10.y, fragment.texcoord[0].y;
ADD texCoord12.x, offset.x, fragment.texcoord[0].x;
MOV texCoord12.y, fragment.texcoord[0].y;
ADD texCoord20.x,-offset.x, fragment.texcoord[0].x;
ADD texCoord20.y, offset.y, fragment.texcoord[0].y;
MOV texCoord21.x, fragment.texcoord[0].x;
ADD texCoord21.y, offset.y, fragment.texcoord[0].y;
ADD texCoord22.x, offset.x, fragment.texcoord[0].x;
ADD texCoord22.y, offset.y, fragment.texcoord[0].y;

TEX texCoord00, texCoord00, texture[0], 2D;
TEX texCoord01, texCoord01, texture[0], 2D;
TEX texCoord02, texCoord02, texture[0], 2D;
TEX texCoord10, texCoord10, texture[0], 2D;
TEX texCoord11, fragment.texcoord[0], texture[0], 2D;
TEX texCoord12, texCoord12, texture[0], 2D;
TEX texCoord20, texCoord20, texture[0], 2D;
TEX texCoord21, texCoord21, texture[0], 2D;
TEX texCoord22, texCoord22, texture[0], 2D;

MUL pixel, texCoord00, const00;
MAD pixel, texCoord01, const01, pixel;
MAD pixel, texCoord02, const00, pixel;
MAD pixel, texCoord10, const01, pixel;
ADD pixel, texCoord11, pixel;
MAD pixel, texCoord12, const01, pixel;
MAD pixel, texCoord20, const00, pixel;
MAD pixel, texCoord21, const01, pixel;
MAD pixel, texCoord22, const00, pixel;

MUL result.color, pixel, const00;
END

Ciao





Similarly threads:
Topics Created by Replies Boardname
3x3 Gaussian blur shader guest 1 pete_bernert
Radial blur shader from SimoneT ShadX 0 pete_bernert
Natural Vision Shader + AA Shader v2.o = Best Shader for 2d !! zaykho 10 pete_bernert
SSX Blur Rafi 0 wii
Blur... footi 26 baroness_strange
Neuer Thread ...





Masthead

This forum is a free service of razyboard.com powered by:
Geizkragen Price Comparison. Top product in the price comparison: Krups Nespresso Essenza (XN2001)
Do you want a free forum in less than two minutes? Then click here!



Verwandte Suchbegriffe:
arb blur shader | arb program gpupeteogl2.vp | arb program gpupeteogl2 | texcoord10
blank