Page 1 of 1
Is there a reason that AlphaGen wave can't use noise?
Posted: Tue Apr 03, 2007 12:37 pm
by Amphetamine
As title really, AlphaGen wave doesn't have the noise waveform that rgbGen wave does, is there a practical reason for this other than "id didn't need to use it"?
Posted: Tue Apr 03, 2007 3:20 pm
by obsidian
I wondered about this myself and I don't see any practical reason why they didn't include it.
The noise function always seemed to be more of an afterthought since most directives using waveforms can't use it. They may have added it to rgbGen only for something specific that they wanted to do.
Posted: Tue Apr 03, 2007 5:54 pm
by ^misantropia^
Do you guys happen to have an example shader? AFAICT, Q3 parses "alphaGen wave noise" without a problem.
Posted: Tue Apr 03, 2007 6:16 pm
by obsidian
Maybe it does... I'm just going off of what's in the documentation (which has plenty of holes in it, I'll admit) and a quick check in Q3ASE (which lacks any feature of adding noise waveforms to alphaGen, but does with rbgGen).
Posted: Wed Apr 04, 2007 12:02 am
by Amphetamine
No it doesn't, I only really noticed the other day when I wrote a shader and Q3 gave me a runtime error every time that shader came into view (didn't even error until a surface it was on was in the PVS).
The error is:
"TABLEFORFUNC CALLED WITH INVALID FUNCTION '6' IN <your/shadername>"
I was actually gonna post the error on here until I figured it out. In the end I loaded it up into Q3ASE to check there wern't any stupid errors I'd overlooked, and there it was.
Posted: Wed Apr 04, 2007 1:09 am
by obsidian
Would you mind posting the shader?
Posted: Wed Apr 04, 2007 9:34 am
by Amphetamine
Code: Select all
textures/construct/crypt
{
qer_editorimage textures/construct/crypt1.tga
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.9
cull none
polygonoffset
{
animmap 6 textures/construct/crypt1.tga textures/construct/crypt2.tga textures/construct/crypt3.tga
blendfunc blend
alphaGen wave noise 0.4 0.6 0 38
}
}
Designed for copying a section of geometry, clipping it into interesting shapes, cauling the lot, texturing the external faces with this shader and then placing back over the original geometry. It's for a digital corruption effect on surfaces in The Construct.
Posted: Wed Apr 04, 2007 7:17 pm
by obsidian
Curious, I tried adding alphaGen wave noise to one of my own shaders and Q3 crashes with the same error. I guess it's broken.
Posted: Wed Apr 04, 2007 8:15 pm
by ^misantropia^
Indeed. Q3 parses the "noise" bit just fine but doesn't know how to deal with it later on. I wrote a fairly trivial patch that I'll submit to ioquake3 after I get the chance to test it properly (not at home right now and won't be for the next ten days). Not really relevant for the Q3 mapping crowd perhaps, but it might turn out useful for standalone games.
Seven or eight years working with this engine and you still find new things (and bugs).

Posted: Wed Apr 04, 2007 9:45 pm
by Amphetamine
Probably more use than you'd think, OpenArena uses ioquake as it's base, so your fix will eventually work it's way into their code base, and then trickly down into standalone mods and other games that use OpenArena as a base. You never know where that code's going to end up.