BVEC not supported or am I syntactically handicapped?


#1

Hey there folks!

new version 7 available


http://metaversecafes.com/HighFidelity/QueenCity/shaders/flame_v7.fs
{"ProceduralEntity":{"shaderUrl":"http://metaversecafes.com/HighFidelity/QueenCity/shaders/flame_v7.fs" }}

** the process **
I’m trying to use disgard in a proper sense to eliminate certain pixels just like Qurroball does. However, my conditional for such occurrance needs to be a comparison of vector scalars; example, “is vector A [bigger] than vector B” [code]bvec thePath = lessThan(dahOne, dahTest);

if (any(thePath)) {
    discard;		
}
else
{
	fragColor = dahOne;
}

[/code]

problem is, when I use bvec in my statement above I get the following error in the log: Unexpected ‘=’ expecting ’ :: ’ only time I’ve seen ’ :: ’ used is for Prototyping and Class OBJ extensions in C. So… what the hell? Am I missing something obvious? Is there no current support for the following?

bvec
lessThan
greaterThan
equalTo

???

Please help me @Jherico, I’d like to keep hacking the shader integration so we can find out what works and what doesn’t.

special note I’ve gone rouge on this current “flame” integration, so I plan to use ‘discard’ and maybe add in third dimensional support. That’s a big stretch however, considering I’m struggling with booleanVector support. o.O

*_v1.fs works great. but I need to disgard (as you can see)

THOUGHTS?

UPDATE


Well that didn’t take too long… here is a work around until I figure out BVEC and Vector Comparison support…

vec4 dahOne = mix(vec4(0.), col, pow(glow*2.,4.));
	vec4 dahTest = vec4(0.1,0.1,0.1,0.5);	
	bool finalFlag = false;
	for(int q=0; q<3; q++)
	{
		if(dahOne[q]< dahTest[q])
		{
			finalFlag = true;
		}
	}
	if (finalFlag) {
        discard;		
    }
	else
	{
		fragColor = dahOne;
	}

Don’t put your coat on just yet @Judas, this is JUST starting to get interesting…


bvecn: a vector of n booleans.
Results are in… I’m syntactically handicapped. :smiley: should have been using bvec4 and not bvec. oh well. live and learn.