home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Fullscreen shaders

by demonicpriest23 on 05/15/2007 06:36, 27 messages, last message: 05/21/2007 23:07, 8946 views, last view: 05/18/2024 01:11

Just wondering if anyone here knows how to make new fullscreen shaders or edit existing ones. The main thing I want to do is stuff like color switches, like the one they already have. i hope it doesnt take too much hard programming...

-DemonicPriest (2/3=0.666)
-The original asshole

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages

#5: Re: ..

by nieb on 05/17/2007 21:41, refers to #1

>>
shader 0 "test" [ @fsvs @setup4corners END ] [
@fsps
@sample4corners

TEMP t, u;

SUB t, s00, s20;
ADD t, t, s20;
SUB t, t, s22;
ADD t, t, t;

ADD u, s00, s02;
SUB u, u, s20;
SUB u, u, s22;
MUL u, u, u;

ADD t, t, u;

ADD result.color, sample, t;
MUL result.color, t, 1.2;

END
]
<<
That shader looks so cool Der/Nalia. :D
Looks like you used some of the bumpmapping code in there...weird.

reply to this message

#6: ..

by demonicpriest132048466123 on 05/17/2007 22:02

I tried that shader. I put it under fullscreen shaders, went into the game and did "setfullscreenshader test" but it didn't work. I tried it again with numbers after it (...test 1, 0, and 1000) and it was still broken. What am I doing wrong..?

reply to this message

#7: Re: ..

by Passa on 05/18/2007 01:31, refers to #6

Does your card support full screen shaders?

reply to this message

#8: Re: ..

by absinth on 05/18/2007 01:33, refers to #5

>That shader looks so cool Der/Nalia. :D

yes it looks cool ;o)
a screenshot for those that can't get it to work:

http://tinyurl.com/32oxbk

reply to this message

#9: Re: ..

by demonicpriest0104905 on 05/18/2007 01:58, refers to #7

Yeah, my card supports it. I can run bloom and all the other ones it comes with. I can run bloom in some maps with a 1280 res and max settings and get 30 fps, and otherwise I get shitloads higher FPS, so I have a pretty good card (although Sauer is a resource whore, I gotta say- Farcry runs top setting high res and gets almost double that FPS...)

reply to this message

#10: Re: ..

by Passa on 05/18/2007 02:29, refers to #9

Yeah and Far Cry doesn't have quite the same number of advanced features that Sauerbraten has. You're comparing apples and oranges there (and anyway, its an isolated problem, because I get sub 80 FPS in Far Cry and 199+ in Sauerbraten).

reply to this message

#11: ..

by Der/Nalia on 05/18/2007 04:06

Here are some more screenshots with some maps my team has done... with before and after

http://ss.faithnation.com/media/Screenshots/Unnamed.html

reply to this message

#12: ..

by demonicpriest0104905 on 05/18/2007 04:54

Oh yeah, and share your shaders (because I suck at programming- I tried it. I pretty much said "wtf" after I saw gibberish, and Sauer-script is even more gibberish)

/R/ cell shading effect

reply to this message

#13: Re: ..

by Acord on 05/18/2007 15:23, refers to #12

Did you recompile the code?

reply to this message

#14: ..

by demonicpriest0104905 on 05/18/2007 19:27

I just copy and pasted it

reply to this message

#15: Re: ..

by SanHolo on 05/19/2007 06:29, refers to #14

Well, without recompiling your code ist not even in the game. ;)

reply to this message

#16: ..

by demonicpriest1981905108975 on 05/19/2007 06:44

Uh how do I recompile it?

reply to this message

#17: Re: ..

by baby rabbit on 05/19/2007 14:53, refers to #16

urm... stdshader.cfg is read each time the game launches, there is no need to compile anything else if you're just editing it.

reply to this message

#18: Re: ..

by kurtis84 on 05/19/2007 16:40, refers to #17

We shouldn't need to be editing stdshader.cfg ( or anything in the /data dir ). The proper method of adding in new shaders, is to use a map.cfg. This won't work with the fullscreen shaders, so I suppose it's the only way?

reply to this message

#19: ..

by demonicpriest1981905108975 on 05/19/2007 20:41

Still doesnt work -.-

reply to this message

#20: Re: ..

by shadow,516 on 05/19/2007 20:54, refers to #18

it works just fine in a map.cfg

copy pase it at the end, and voila

reply to this message

#21: Re: ..

by kurtis84 on 05/20/2007 02:08, refers to #20

I think the object of a full screen shader, is to not be map specific...putting it in a map file requires loading that map, and the effect will not be in any other maps.

reply to this message

#22: ..

by ethan592 on 05/20/2007 04:26

the bump mapping is what allows the edges to be highlighted like that. there is prolly a cheaper way to do it but w/e

reply to this message

#23: another example

by baby rabbit on 05/20/2007 14:18

An old trick - very cheap, super blur!

shader 0 "blur" [ @fsvs END ] [
@fsps
TEMP dtc, sample2;
MAD dtc, sample, 0.1, 0.7;
MUL dtc, fragment.texcoord[0], dtc;
FRC dtc, dtc;
MAD dtc, dtc, 64, -32; //blur offset
ADD dtc, dtc, fragment.texcoord[0];
TEX sample2, dtc, texture[0], RECT;
MOV result.color, sample2;
END
]

reply to this message

#24: Re: another example

by baby rabbit on 05/20/2007 14:21, refers to #23

Damn - where's the edit post button?
Lets make that a little more efficient...

shader 0 "blur" [ @fsvs END ] [
@fsps
TEMP dtc;
MAD dtc, sample, 0.1, 0.7;
MUL dtc, fragment.texcoord[0], dtc;
FRC dtc, dtc;
MAD dtc, dtc, 64, -32; //blur offset
ADD dtc, dtc, fragment.texcoord[0];
TEX result.color, dtc, texture[0], RECT;
END
]

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
54038488 visitors requested 71818875 pages
page created in 0.022 seconds using 9 queries
hosted by Boost Digital