|
|||||||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#91 | |
|
DriverHeaven Newbie
Join Date: Oct 2003
Posts: 2
Rep Power: 0 ![]() |
Quote:
So, if you wanted to use the "noarmalNoseColor.raw" texture, put the line texture[1].source = normalnoise above the call for apply dirtPixelShader. That should work, if I understand your problem correctly! Now, a question of my own... is a list anywhere of the available instructions, what they do and the arguments they take? From Googling, I've found some lists, but some of the instructions I found arent recognized (I assume I managed to find instructions on a similar ISA or something) and some of them I just plain don't know what they do or they want more arguments then I think they should have. I've been lucky in a few cases (thank goodness SLT and SGE did what I expected them to ), but it'd be quite helpful to get a full list ![]() Wish I had come to this board earlier, I was pulling my hair out trying to figure out why the alpha information I was modifying wasn't sticking, now I know!
|
|
|
|
|
|
|
#92 |
|
DriverHeaven Newbie
Join Date: Feb 2004
Posts: 5
Rep Power: 0 ![]() |
multiple textures
can someone please explain how to use more than one user defined texture ?
i tried something like this: surface ascii = allocsurf(8*64, 10); load_texture(1, 8*64, 10, 1, "ubyte", "ascii8x10.raw"); texture[0].source = backbuffer; texture[1].source = ascii; destination temp1; apply blablaShader; it didnt work ![]() but when i left out the texture[1].source = ascii; line, it did work. so whats the problem here? i'd need something like this surface temp1 = allocsurf(width, height); surface temp2 = allocsurf(width, height); surface temp3 = allocsurf(width, height); texture[0].source = temp1; texture[1].source = temp2; destination temp3; apply pShaderOne; texture[0].source = temp3; texture[1].source = (some texture loaded from a file) ; destination backbuffer; apply pShaderTwo; how can i accomplish this ? |
|
|
|
|
|
#93 |
|
ATI Guru
Join Date: Feb 2004
Location: Marlboro, MA
Posts: 9
Rep Power: 0 ![]() |
I think the problem you people who are having trouble with multiple textures has already been addressed by Roger. There is a bug that prevents loading of a texture from happening until after the first shader is applied. You can work around this by creating a 1x1 surface and applying a dummy shader to it to force your textures to get loaded. You can see on the asccii shader we apply the downsample shader before we try to access the ascii texture and that is why we never noticed the bug. Roger has fixed this and it should work in a future driver, but for just work around it.
Arrghman, I'm not sure if you're talking about arb_fragement_program instructions or instructions handled in smartShader scripting language. If your talking about arb_fragment_program the spec lists them all and it can be found at: http://oss.sgi.com/projects/ogl-samp...nt_program.txt If you want to know about the scripting language look at http://www.driverheaven.net/smartshader/ http://www.driverheaven.net/rogerATI/ and the example programs. |
|
|
|
|
|
#94 |
|
DriverHeaven Newbie
Join Date: Oct 2003
Posts: 2
Rep Power: 0 ![]() |
The fragment_program.txt file has exactly what I was looking for, thanks very much!
|
|
|
|
|
|
#95 |
|
DriverHeaven Newbie
Join Date: Feb 2004
Location: NSW, Australia
Posts: 4
Rep Power: 0 ![]() |
posterize filter
i'm trying to write a posterizer filter but i don't seem to have a full grasp of how this works...
my idea is to multiply the channel values by a constant, chop off the fractional part, and then divide by the same constant as before, to leave the image with a much smaller number of discrete values. val = {trunc(pixel.r*mult)/mult, trunc(pixel.g*mult)/mult, trunc(pixel.b*mult)/mult, 1}; MOV oColor, val; unfortunately it doesn't work, and i get this: line 17: invalid statement. any ideas/help would be much appreciated |
|
|
|
|
|
#96 |
|
ATI Guru
Join Date: Feb 2004
Location: Marlboro, MA
Posts: 9
Rep Power: 0 ![]() |
You can't *, /, or use trunc() inside a fragment shader. You probably want to look at the Green Ascii.pss example since that does what you want to do. Pay special attention to the FRC comand in the fragment shader which gets the decimal portion of the floating point number. The interview with Roger and myelf here at DriverHevean goes into the details of how Green Ascii.pss works. If you'd rather work it out on your own that's great, just remember the that fragment programs are like assembly code and you can only do one thing per line.
|
|
|
|
|
|
#97 |
|
DriverHeaven Newbie
Join Date: Feb 2004
Location: NSW, Australia
Posts: 4
Rep Power: 0 ![]() |
thanks alot Maurice!
i had another go at making the posterizer using the information you gave me (but without looking at the ascii example), and now it works, and looks as good and as ugly as could be expected. |
|
|
|
|
|
#98 |
|
DriverHeaven Newbie
Join Date: Feb 2004
Location: NSW, Australia
Posts: 4
Rep Power: 0 ![]() |
i 'made' a classic style filter incorporating the sepia filter, the porthole filter (to create a more subtle vignette effect), the posterizer filter i made, and some flicker.
it looks fairly effective what sort of effects are other people coming up with? |
|
|
|
|
|
#99 |
|
DriverHeaven Newbie
Join Date: Feb 2004
Posts: 5
Rep Power: 0 ![]() |
what effects ?
1) i wrote some program that has some ui where you can combine different effects and it generates a smartshader for it
2) question: how can i load more than one user-defined texture and switch between them ? like this: texture[1].source=noiseTex; apply addNoiseShader texture[1].source=colorMap; apply addColorMapping where noiseTex & colorMap should be loaded from 2 external files |
|
|
|
|
|
#100 |
|
ATI Guru
Join Date: Feb 2004
Location: Marlboro, MA
Posts: 9
Rep Power: 0 ![]() |
tentacle - The only way to do that with the current implementation of smartShader is to put the color map in texture unit 2. This should be fine so long as your total texture usage doesn't exceed 8. If it does I commend you on one complex shader
And then you could work around that by merging multiple textures into one unit and then modifying your texture coordinates to grab data from the proper part of the texture.
|
|
|
|
|
|
#101 |
|
DriverHeaven Newbie
Join Date: Feb 2004
Posts: 5
Rep Power: 0 ![]() |
load_texture(2, 8*64, 10, 1, "ubyte", "chars512x10.raw");
texture[0].source = dummy; destination dummy; apply copyPixelShader; load_texture(3, 64, 64, 1, "ubyte", "noise64x64.raw"); texture[0].source = dummy; destination dummy; apply copyPixelShader; it reads noise into tex slot 3 fine, but i get parts of noise tex + some random into tex slot 2 help pls .... |
|
|
|
|
|
#102 |
|
DriverHeaven Newbie
Join Date: Jun 2004
Posts: 1
Rep Power: 0 ![]() |
Hi!
I would like to know if there is any template just for changing color saturation? Unfortunately I can't manage this smartshader stuff and I as a IL2FB player I think that deacreasing color saturation would improve alot game environment. Thanks! |
|
|
|
|
|
#103 |
|
DriverHeaven Newbie
Join Date: Oct 2004
Posts: 1
Rep Power: 0 ![]() |
what happened to this competition?
is it still going on?' edit: heh, nevermind
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|