decal above decal

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

decal above decal

Post 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.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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
Image
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

Ay doesn't really work :cry: I'll look for an other solution then. Thanks anyway :) .
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

hide and show

Post 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?
Tom Trude,

Image
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post 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 =).
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

translation

Post 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.
Tom Trude,

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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...
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Post Reply