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

Homepage Members Register Login Search Old board


Neuer Thread ...
More : [1] [2] [3]


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

guest ...
Real addict
.........

...

Status:Offline
Date registered: 30.07.2004
Post:856
Send Message
...   Created on 08.01.2005 - 15:42Jump to top Quote this post Report this post Edit Delete


Could u repost gpuPeteOGL2.fp and gpuPeteOGL2.vp files?




<<guest>>
unregistried

...   Created on 08.01.2005 - 19:46Jump to top Quote this post Report this post Edit Delete


I'm not working on a effect for the plugin, but for the ATI smartshader software.


This is the last version of my totaly screwed up code. (Yeah, I have no clue what I'm doing...)

shader samplePixelShader =
"!!ARBfp1.0

TEMP Temp;

TEX result.color, fragment.texcoord[0], texture[0], 2D;

END";

shader gaussianXPixelShader =
"!!ARBfp1.0

PARAM Offset[11]={ program.local[0..10] };

PARAM Weight[3]=
{
{ 0.2, 0.1, 0.05, 0.02 },
{ 0.02, 0.01, 0.005, 0.002 },
{ 0.004, 0.002, 0.001, 0.00025 }
};

TEMP s0, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10;

ADD r0, -Offset[10], fragment.texcoord[0];
ADD r1, -Offset[ 8], fragment.texcoord[0];
ADD r2, -Offset[ 7], fragment.texcoord[0];
ADD r3, -Offset[ 6], fragment.texcoord[0];
ADD r4, -Offset[ 5], fragment.texcoord[0];
ADD r5, -Offset[ 4], fragment.texcoord[0];
ADD r6, -Offset[ 3], fragment.texcoord[0];
ADD r7, -Offset[ 2], fragment.texcoord[0];
ADD r8, -Offset[ 1], fragment.texcoord[0];
ADD r9, -Offset[ 0], fragment.texcoord[0];
ADD r10, -Offset[ 0], fragment.texcoord[0];
MOV s0, fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

TEX s0, s0, texture[0], 2D;

MUL s0, s0, Weight[0].x;
MAD s0, r0, Weight[1].w, s0;
MAD s0, r1, Weight[1].z, s0;
MAD s0, r2, Weight[1].y, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].w, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].y, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[0].w, s0;
MAD s0, r9, Weight[0].z, s0;
MAD s0, r10, Weight[0].y, s0;

ADD r0, Offset[ 0], fragment.texcoord[0];
ADD r1, Offset[ 1], fragment.texcoord[0];
ADD r2, Offset[ 2], fragment.texcoord[0];
ADD r3, Offset[ 3], fragment.texcoord[0];
ADD r4, Offset[ 4], fragment.texcoord[0];
ADD r5, Offset[ 5], fragment.texcoord[0];
ADD r6, Offset[ 6], fragment.texcoord[0];
ADD r7, Offset[ 7], fragment.texcoord[0];
ADD r8, Offset[ 8], fragment.texcoord[0];
ADD r9, Offset[ 9], fragment.texcoord[0];
ADD r10, Offset[10], fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

MAD s0, r0, Weight[0].y, s0;
MAD s0, r1, Weight[0].z, s0;
MAD s0, r2, Weight[0].w, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].y, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].w, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[1].y, s0;
MAD s0, r9, Weight[1].z, s0;
MAD s0, r10, Weight[1].w, s0;

MOV result.color, s0;

END";

shader gaussianYPixelShader =
"!!ARBfp1.0

PARAM Offset[11]={ program.local[0..10] };

PARAM Weight[3]=
{
{ 0.2, 0.1, 0.05, 0.02 },
{ 0.02, 0.01, 0.005, 0.002 },
{ 0.004, 0.002, 0.001, 0.00025 }
};

TEMP s0, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10;

ADD r0, -Offset[10], fragment.texcoord[0];
ADD r1, -Offset[ 9], fragment.texcoord[0];
ADD r2, -Offset[ 8], fragment.texcoord[0];
ADD r3, -Offset[ 7], fragment.texcoord[0];
ADD r4, -Offset[ 6], fragment.texcoord[0];
ADD r5, -Offset[ 5], fragment.texcoord[0];
ADD r6, -Offset[ 4], fragment.texcoord[0];
ADD r7, -Offset[ 3], fragment.texcoord[0];
ADD r8, -Offset[ 2], fragment.texcoord[0];
ADD r9, -Offset[ 1], fragment.texcoord[0];
ADD r10, -Offset[ 0], fragment.texcoord[0];
MOV s0, fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

TEX s0, s0, texture[0], 2D;

MUL s0, s0, Weight[0].x;
MAD s0, r0, Weight[1].w, s0;
MAD s0, r1, Weight[1].z, s0;
MAD s0, r2, Weight[1].y, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].w, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].y, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[0].w, s0;
MAD s0, r9, Weight[0].z, s0;
MAD s0, r10, Weight[0].y, s0;

ADD r0, Offset[ 0], fragment.texcoord[0];
ADD r1, Offset[ 0], fragment.texcoord[0];
ADD r2, Offset[ 1], fragment.texcoord[0];
ADD r3, Offset[ 2], fragment.texcoord[0];
ADD r4, Offset[ 3], fragment.texcoord[0];
ADD r5, Offset[ 4], fragment.texcoord[0];
ADD r6, Offset[ 5], fragment.texcoord[0];
ADD r7, Offset[ 6], fragment.texcoord[0];
ADD r8, Offset[ 7], fragment.texcoord[0];
ADD r9, Offset[ 8], fragment.texcoord[0];
ADD r10, Offset[10], fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

MAD s0, r0, Weight[0].y, s0;
MAD s0, r1, Weight[0].z, s0;
MAD s0, r2, Weight[0].w, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].y, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].w, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[1].y, s0;
MAD s0, r9, Weight[1].z, s0;
MAD s0, r10, Weight[1].w, s0;

MOV result.color, s0;

END";

shader outputPixelShader =
"!!ARBfp1.0

TEMP back, blur;

TEX blur, fragment.texcoord[0], texture[0], 2D;
TEX back, fragment.texcoord[0], texture[1], 2D;


ADD blur, blur, blur;
ADD result.color, back, blur;

END";

shader outputPixelShader2 =
"!!ARBfp1.0

# threshold for tag shader (try different values)
PARAM thresh = {0.5, 0.5, 0.5, 0.5};

TEMP back, blur, temp;

TEX blur, fragment.texcoord[0], texture[0], 2D;
TEX back, fragment.texcoord[0], texture[1], 2D;


# subtract threshold value from the 'back' value
SUB temp, back, thresh;

# if temp value is smaller than threshold, kill fragment
KIL blur;

ADD result.color, back, blur;

END";

surface blur0 = allocsurf(width/8, height/8);
surface blur1 = allocsurf(width/8, height/8);

gaussianXPixelShader.constant[ 0] = { (4.0*ds_dx)* 1.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 1] = { (4.0*ds_dx)* 3.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 2] = { (4.0*ds_dx)* 5.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 3] = { (4.0*ds_dx)* 7.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 4] = { (4.0*ds_dx)* 9.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 5] = { (4.0*ds_dx)*11.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 6] = { (4.0*ds_dx)*13.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 7] = { (4.0*ds_dx)*15.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 8] = { (4.0*ds_dx)*17.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 9] = { (4.0*ds_dx)*19.45, 0, 0, 0 };
gaussianXPixelShader.constant[10] = { (4.0*ds_dx)*21.45, 0, 0, 0 };

gaussianYPixelShader.constant[ 0] = { 0, (4.0*dt_dy)* 1.45, 0, 0 };
gaussianYPixelShader.constant[ 1] = { 0, (4.0*dt_dy)* 3.45, 0, 0 };
gaussianYPixelShader.constant[ 2] = { 0, (4.0*dt_dy)* 5.45, 0, 0 };
gaussianYPixelShader.constant[ 3] = { 0, (4.0*dt_dy)* 7.45, 0, 0 };
gaussianYPixelShader.constant[ 4] = { 0, (4.0*dt_dy)* 9.45, 0, 0 };
gaussianYPixelShader.constant[ 5] = { 0, (4.0*dt_dy)*11.45, 0, 0 };
gaussianYPixelShader.constant[ 6] = { 0, (4.0*dt_dy)*13.45, 0, 0 };
gaussianYPixelShader.constant[ 7] = { 0, (4.0*dt_dy)*15.45, 0, 0 };
gaussianYPixelShader.constant[ 8] = { 0, (4.0*dt_dy)*17.45, 0, 0 };
gaussianYPixelShader.constant[ 9] = { 0, (4.0*dt_dy)*19.45, 0, 0 };
gaussianYPixelShader.constant[10] = { 0, (4.0*dt_dy)*21.45, 0, 0 };

texture[0].magfilter = "linear";

texture[0].source = backbuffer;
destination blur0;
apply samplePixelShader;

texture[0].source = blur0;
destination blur1;
apply gaussianXPixelShader;

texture[0].source = blur1;
destination blur0;
apply gaussianYPixelShader;

texture[0].source = blur0;
texture[0].source = blur1;
texture[1].source = backbuffer;
destination backbuffer;
apply outputPixelShader2;




I just want a frag.program that blooms very bright areas of the screen and (if possible) blooms really red areas.

But I've no clue how to do it.




<<guest>>
unregistried

...   Created on 10.01.2005 - 00:37Jump to top Quote this post Report this post Edit Delete


I have now a more concrete idea of what I want.

My english is not that good. So I'll post some images.

Lets say this is the current frame:


Now I want to copy that frame to the buffer.

The saturation goes up by 25%:

Now we decrease the brightness by 25%

and rise the contrast by 50%.

Now I want to use a gaussian filter on this image. Or if a blur will do, a blur.

The last part is to negative multiply the new frame with the original one (by 50%):


I can take care of the gaussin filter. But I've no idea how to rise saturation or contrast.

And I'm not even sure whether something like negative multiply is even possible with pixel shaders.

If it's not possible I'll stop trying.




<ShadX>
unregistried

...   Created on 10.01.2005 - 14:19Jump to top Quote this post Report this post Edit Delete


Hi <<guest>>,
Why you want to work on a code that you can't test?
What you mean to say with "negative multiply"?
Bye




<ShadX>
unregistried

...   Created on 10.01.2005 - 14:44Jump to top Quote this post Report this post Edit Delete


Here some GLSL from 3Dlabs. If you want you can translate them in ARB asm.

//
// Vertex shader for modifying image brightness by
// interpolation and extrapolation
//
// Author: Randi Rost
//
// Copyright (c) 2003-2004: 3Dlabs, Inc.
//
// See 3Dlabs-License.txt for license information
//

varying vec2 TexCoord;

void main (void)

{
gl_Position = ftransform();
TexCoord = gl_MultiTexCoord0.st;
}

//
// Fragment shader for modifying image brightness by
// interpolation and extrapolation
//
// Author: Randi Rost
//
// Copyright (c) 2003-2004: 3Dlabs, Inc.
//
// See 3Dlabs-License.txt for license information
//

varying vec2 TexCoord;
uniform float Alpha;
uniform sampler2D Image;

void main (void)
{
gl_FragColor = texture2D(Image, TexCoord) * Alpha;
}

//
// Vertex shader for modifying image contrast by
// interpolation and extrapolation
//
// Author: Randi Rost
//
// Copyright (c) 2003-2004: 3Dlabs, Inc.
//
// See 3Dlabs-License.txt for license information
//

varying vec2 TexCoord;

void main (void)

{
gl_Position = ftransform();
TexCoord = gl_MultiTexCoord0.st;
}

//
// Fragment shader for modifying image contrast by
// interpolation and extrapolation
//
// Author: Randi Rost
//
// Copyright (c) 2002: 3Dlabs, Inc.
//
// See 3Dlabs-License.txt for license information
//

varying vec2 TexCoord;

uniform vec3 AvgLuminance;
uniform float Alpha;
uniform sampler2D Image;

void main (void)
{
vec3 color = texture2D(Image, TexCoord).rgb;
color = mix(AvgLuminance, color, Alpha);
gl_FragColor = vec4 (color, 1.0);
}

and 3Dlabs-License.txt

/************************************************************************
* *
* Copyright (C) 2002-2004 3Dlabs Inc. Ltd. *
* *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* *
* Redistributions of source code must retain the above copyright *
* notice, this list of conditions and the following disclaimer. *
* *
* Redistributions in binary form must reproduce the above *
* copyright notice, this list of conditions and the following *
* disclaimer in the documentation and/or other materials provided *
* with the distribution. *
* *
* Neither the name of 3Dlabs Inc. Ltd. nor the names of its *
* contributors may be used to endorse or promote products derived *
* from this software without specific prior written permission. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
* POSSIBILITY OF SUCH DAMAGE. *
* *
************************************************************************/
Bye




<<guest>>
unregistried

...   Created on 11.01.2005 - 15:09Jump to top Quote this post Report this post Edit Delete


Thanks.

I want that code, cause it will work on Geforce cards too, very soon.




guest ...
Real addict
.........

...

Status:Offline
Date registered: 30.07.2004
Post:856
Send Message
...   Created on 11.01.2005 - 23:46Jump to top Quote this post Report this post Edit Delete


I think the glSlang spcifications are one and unique...most things should work without problems on nVidia cards too.

Be optimistic!

A good shader tool could also be the "Shader Designer".
If something doesn't work it supports SW mode.

It can be found at http://www.typhoonlabs.com/

[Dieser Beitrag wurde am 12.01.2005 - 16:22 von guest aktualisiert]




<_guest_>
unregistried

...   Created on 18.02.2005 - 18:42Jump to top Quote this post Report this post Edit Delete


So is there a bloom filter for Pete's plugin?




guest ...
Real addict
.........

...

Status:Offline
Date registered: 30.07.2004
Post:856
Send Message
...   Created on 18.02.2005 - 22:21Jump to top Quote this post Report this post Edit Delete


If you would describe the "blooming" issue mathematicaly or with logical relations, you would most likely get an answer...maybe in a form of a shader or na explanation what aditional data you have to have etc, etc...

PS: i wait some for inspiration to come

[Dieser Beitrag wurde am 24.03.2005 - 20:12 von guest aktualisiert]




<_guest_>
unregistried

...   Created on 19.02.2005 - 11:02Jump to top Quote this post Report this post Edit Delete


shader gaussianXPixelShader =
"!!ARBfp1.0

PARAM Offset[11]={ program.local[0..10] };

PARAM Weight[2]=
{
{ 0.2056, 0.13455275, 0.05549925, 0.023592 },
{ 0.0339855, 0.022268, 0.009174, 0.0038995 },
{ 0.0056175, 0.0036765, 0.0015165, 0.0006445 }
};

TEMP s0, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10;

ADD r0, -Offset[10], fragment.texcoord[0];
ADD r1, -Offset[ 9], fragment.texcoord[0];
ADD r2, -Offset[ 8], fragment.texcoord[0];
ADD r3, -Offset[ 7], fragment.texcoord[0];
ADD r4, -Offset[ 6], fragment.texcoord[0];
ADD r5, -Offset[ 5], fragment.texcoord[0];
ADD r6, -Offset[ 4], fragment.texcoord[0];
ADD r7, -Offset[ 3], fragment.texcoord[0];
ADD r8, -Offset[ 2], fragment.texcoord[0];
ADD r9, -Offset[ 1], fragment.texcoord[0];
ADD r10, -Offset[ 0], fragment.texcoord[0];
MOV s0, fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

TEX s0, s0, texture[0], 2D;

MUL s0, s0, Weight[0].x;
MAD s0, r0, Weight[2].w, s0;
MAD s0, r1, Weight[2].z, s0;
MAD s0, r2, Weight[2].y, s0;
MAD s0, r3, Weight[2].x, s0;
MAD s0, r4, Weight[1].w, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].y, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[0].w, s0;
MAD s0, r9, Weight[0].z, s0;
MAD s0, r10, Weight[0].y, s0;

ADD r0, Offset[ 0], fragment.texcoord[0];
ADD r1, Offset[ 1], fragment.texcoord[0];
ADD r2, Offset[ 2], fragment.texcoord[0];
ADD r3, Offset[ 3], fragment.texcoord[0];
ADD r4, Offset[ 4], fragment.texcoord[0];
ADD r5, Offset[ 5], fragment.texcoord[0];
ADD r6, Offset[ 6], fragment.texcoord[0];
ADD r7, Offset[ 7], fragment.texcoord[0];
ADD r8, Offset[ 8], fragment.texcoord[0];
ADD r9, Offset[ 9], fragment.texcoord[0];
ADD r10, Offset[10], fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

MAD s0, r0, Weight[0].y, s0;
MAD s0, r1, Weight[0].z, s0;
MAD s0, r2, Weight[0].w, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].y, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].w, s0;
MAD s0, r7, Weight[2].x, s0;
MAD s0, r8, Weight[2].y, s0;
MAD s0, r9, Weight[2].z, s0;
MAD s0, r10, Weight[2].w, s0;

MOV result.color, s0;

END";

shader gaussianYPixelShader =
"!!ARBfp1.0

PARAM Offset[11]={ program.local[0..10] };

PARAM Weight[2]=
{
{ 0.2056, 0.13455275, 0.05549925, 0.023592 },
{ 0.0339855, 0.022268, 0.009174, 0.0038995 },
{ 0.0056175, 0.0036765, 0.0015165, 0.0006445 }
};

TEMP s0, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10;

ADD r0, -Offset[10], fragment.texcoord[0];
ADD r1, -Offset[ 9], fragment.texcoord[0];
ADD r2, -Offset[ 8], fragment.texcoord[0];
ADD r3, -Offset[ 7], fragment.texcoord[0];
ADD r4, -Offset[ 6], fragment.texcoord[0];
ADD r5, -Offset[ 5], fragment.texcoord[0];
ADD r6, -Offset[ 4], fragment.texcoord[0];
ADD r7, -Offset[ 3], fragment.texcoord[0];
ADD r8, -Offset[ 2], fragment.texcoord[0];
ADD r9, -Offset[ 1], fragment.texcoord[0];
ADD r10, -Offset[ 0], fragment.texcoord[0];
MOV s0, fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

TEX s0, s0, texture[0], 2D;

MUL s0, s0, Weight[0].x;
MAD s0, r0, Weight[2].w, s0;
MAD s0, r1, Weight[2].z, s0;
MAD s0, r2, Weight[2].y, s0;
MAD s0, r3, Weight[2].x, s0;
MAD s0, r4, Weight[1].w, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].y, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[0].w, s0;
MAD s0, r9, Weight[0].z, s0;
MAD s0, r10, Weight[0].y, s0;

ADD r0, Offset[ 0], fragment.texcoord[0];
ADD r1, Offset[ 1], fragment.texcoord[0];
ADD r2, Offset[ 2], fragment.texcoord[0];
ADD r3, Offset[ 3], fragment.texcoord[0];
ADD r4, Offset[ 4], fragment.texcoord[0];
ADD r5, Offset[ 5], fragment.texcoord[0];
ADD r6, Offset[ 6], fragment.texcoord[0];
ADD r7, Offset[ 7], fragment.texcoord[0];
ADD r8, Offset[ 8], fragment.texcoord[0];
ADD r9, Offset[ 9], fragment.texcoord[0];
ADD r10, Offset[10], fragment.texcoord[0];

TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;

MAD s0, r0, Weight[0].y, s0;
MAD s0, r1, Weight[0].z, s0;
MAD s0, r2, Weight[0].w, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].y, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].w, s0;
MAD s0, r7, Weight[2].x, s0;
MAD s0, r8, Weight[2].y, s0;
MAD s0, r9, Weight[2].z, s0;
MAD s0, r10, Weight[2].w, s0;

MOV result.color, s0;

END";

shader outputPixelShader =
"!!ARBfp1.0

# threshold for tag shader (try different values)
PARAM thresh = {0.5, 0.5, 0.5, 0.5};

TEMP back, blur, temp;

TEX blur, fragment.texcoord[0], texture[0], 2D;
TEX back, fragment.texcoord[0], texture[1], 2D;


ADD blur, blur, blur;



Like this?




More : [1] [2] [3]

Similarly threads:
Topics Created by Replies Boardname
Butterfly Effect Ellesime 1 countcain
Butterfly Effect ernie 0 meistertony
Butterfly Effect CrucifySorrow 1 shizoo
Plugin that changes specific colors only? dex 25 pete_bernert
Der 'Rob Effect' stupidlamb 67 bellacullen
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!



blank