Page 1 of 1

models with alpha channel and fog

Posted: Fri Mar 08, 2013 12:36 pm
by Nahuel
hello forum, i am making a map in darkplaces with some models. I add fog but i have a problem:
Image

Image

the fog affects the models and dissapear when i move the mouse :? If i do not add shader scripts this bug doesnt appear but the models looks with transparency.

I need the correct shader to do not have bugs, i use this shader and didnt work correctly

Code: Select all

	{
	map models/vegetales/pine1
	alphaFunc GT0
	rgbGen vertex
	}
I also test this taken from the multiplant pack from quake 3 arena

Code: Select all

    surfaceparm alphashadow
    cull none
    nopicmip
	{
		map models/mapobjects/multiplant/pine1
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identityLighting
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
this doesn´t work correctly :( i have exactly the same bugs


Any help?

Re: models with alpha channel and fog

Posted: Fri Mar 08, 2013 10:54 pm
by LordHavoc
If it changes depending on view direction then I'm pretty sure it's an engine bug and I'll need to run the map myself to examine renderer state.

Re: models with alpha channel and fog

Posted: Wed Mar 27, 2013 2:15 pm
by stoleYourBike
it works fine for me
using this shader

Code: Select all

textures/tree1/tree
{
	surfaceparm alphashadow
	surfaceparm nomarks
	surfaceparm trans
	cull disable
	nopicmip
	dpmeshcollisions
	{
		map textures/tree1/tree.tga
		rgbGen identity
		depthWrite
		alphaFunc GE128
	}
	{
		map $lightmap 
		blendfunc filter
		rgbGen identity
		tcGen lightmap 
		depthFunc equal
	}
}
might be some useless lines in there, I forgot already, but it works fine