Shooting through textures/brushes


(stebbi67) #1

Hi.

I have a alpha texture ( fence ) on my map which is not possible to shoot through.

I created a brush with the alpha texture on one site and nodraw on the other site. I have also tried to have culk instead of nodraw, but it does not work.

This is my shader for the alpha texture :

textures/ammo_bunker2/a_med6_fence
{
	qer_editorimage textures/ammo_bunker2/a_med6_fence.tga
	surfaceparm trans
	surfaceparm alphashadow
	surfaceparm nomarks
	surfaceparm nonsolid
	cull none
	nomipmaps

	{
		map textures/ammo_bunker2/a_med6_fence.tga
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identity
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}

I believe that this should be possible. Anyone knows how this can be done?


(S14Y3R) #2

hi, i beleive what you’re looking for is surfaceparm clipmissile (yes thats correct spelling) . The other 5 sides of the brush should have common/clipmissile shader.


textures/ammo_bunker2/a_med6_fence
{
   qer_editorimage textures/ammo_bunker2/a_med6_fence.tga
   surfaceparm trans
   surfaceparm alphashadow
   surfaceparm nomarks
   surfaceparm clipmissile
   //surfaceparm nonsolid  //should be solid(nonpassable)
   cull none
   nomipmaps

   {
      map textures/ammo_bunker2/a_med6_fence.tga
      blendFunc GL_ONE GL_ZERO
      alphaFunc GE128
      depthWrite
      rgbGen identity
   }
   {
      map $lightmap
      rgbGen identity
      blendFunc GL_DST_COLOR GL_ZERO
      depthFunc equal
   }
}

I think that’s it, if a shader pro can verify… :stuck_out_tongue:


(masterkiller) #3

Not sure but i think you need to edit your pic (photoshop) to add alpha channel.
But im not sure about that.

gl :slight_smile:


(stebbi67) #4

I tried but no luck.


(S14Y3R) #5

ye like master said, does your texture have an alpha channel? does it “alpha” properly ingame? did you put common/clipmissile on the other 5 sides?
screenshot?