Page 1 of 1

decal above decal

Posted: Wed Jan 04, 2006 2:58 pm
by At0miC
Would like to make a decal texture using polygon offset which can be placed in an other surface of a decal texture without z-fighting. Both decals will be placed in a normal surface. So there are 3 different kinds of priorities for 3 textures. Any idea? Wont be possible I guess.

Posted: Wed Jan 04, 2006 4:27 pm
by jv_map
You could use sort in the shader.
Shader manual wrote: 2.16 sort <value>

Use this keyword to fine-tune the depth sorting of shaders as they are compared against other shaders in the game world. The basic concept is that if there is a question or a problem with shaders drawing in the wrong order against each other, this allows the designer to create a hierarchy of which shader draws in what order. The value here can be either a numerical value (not recommended usage) or one of the keywords in the following list (listed in order of ascending priority):



portal: This surface is a portal, it draws over ever other shader seen inside the portal.

sky: Typically, the sky is the farthest surface in the game world. It draws behind the rest of the world.

opaque: This surface is opaque, rarely needed since this is the default with no blendfunc.

decal: This surface is a decal that is stuck onto a wall.

seeThrough: This surface can be seen through in parts, like grates/ladders. Rarely used anymore.

banner: This surface is a banner that is very close to a wall.

additive: Used for some additive effects

nearest: This shader should always sort closest to the viewer, e.g. muzzle flashes and blend blobs.

underwater: This shader is for something that is seen underwater.

Values may also be used but is not recommended, as the relative order of the keywords should stay the same, the values may change.
Shader Manual

Posted: Wed Jan 04, 2006 5:11 pm
by At0miC
Ay doesn't really work :cry: I'll look for an other solution then. Thanks anyway :) .

hide and show

Posted: Wed Jan 04, 2006 7:38 pm
by tltrude
I'm not getting what you are trying to do. But I'm sure you can't put three decal patches on one surface without z-fighting. Have you tried makeing the patches script_objects and using hide and show?

Posted: Wed Jan 04, 2006 9:10 pm
by At0miC
Aye, sorry if Im not so clear. Well I wanted to have a part of a decal seeing above an other decal, both on a normal surface without z-figting. (on the same grid line). Like a decal on an other decal. But nevermind I'll try a different way like moving up a unit :wink:. Cant use script for this. Thanks =).

translation

Posted: Thu Jan 05, 2006 3:06 am
by tltrude
You "want to have part of one decal showing above another decal..." on the same surface.

I think the only way would be to make a new decal texture with the two images combined.

Posted: Tue Jan 10, 2006 8:02 pm
by lizardkid
could you show us a pic of waht you want? because if the part of the decal you want over the other one is transparent, then you could move it out a unit and it would work...