need something like mat_near

Posted By: mk_1

need something like mat_near - 11/06/05 22:25

Code:
technique test	{
pass p0 {
TextureFactor = 0xFFDD00; // Set color
ColorArg1[0] = TFactor;
ColorOp[0] = SelectArg1;
ZWRITEENABLE = TRUE;
ZFUNC=ALWAYS ;
}
}



This is what I've got. A model is colored yellow. It shall be rendered above ANY mesh and geometry. Right now it's just rendered above level geometry but not models and terrain I don't know why and how to change it. Logic tells me I need something like "write 99999 (or whatever) into z-buffer" but this isn't possible is it? I don't want to use view entities because this needs to be dynamic and I don't want to declare 50 or more view entities (uh performance?). Is it possible to draw above everything in the view (except panels etc. of course)?
Posted By: FRAJO

Re: need something like mat_near - 11/07/05 14:19

Try FillMode or CullMode (0/1/2/3). Dont know which of the two.
Posted By: Bird

Re: need something like mat_near - 11/07/05 17:37

i found this material in one of my skripts (isn't made by me):

material mat_near
{
effect="
technique test
{ pass p0
{
ZWRITEENABLE =TRUE;
ZFUNC=ALWAYS ;
}
}
";
}


if i remember right, you have to set the model transparent, to make it work (alpha can still be 100)
Posted By: mk_1

Re: need something like mat_near - 11/07/05 21:20

Compare it to my effect.

This works indeed, but only for geometry. Sprites are rendered after the models and are still in front of my model.
Posted By: FRAJO

Re: need something like mat_near - 11/08/05 14:35

Hab das Material von Bird getestet und folgendes festgestellt:

Die Models werden auch VOR der levelgeometrie dargestellt. ABER nur wenn sie
nicht durch den BSP tree weggecullt werden. Wenn die engine sie nicht zeichen
muss, wird das material auch gar nicht ausgeführt.
© 2024 lite-C Forums