Page 1 of 1

weird shader problem

Posted: Sun Feb 28, 2010 10:09 pm
by ^Ghost
now ive never had this problem b4, but when i compile with this shader i test the map it runs fine. until, i get near to the point where i used the lava, then it go back to main menu.

which is weird because its the exact code i used for another shader except for the blendfunc and textures.

Code: Select all

textures/minions-run14/lava2_1k
{
        qer_editorimage textures/ghost-custom/protolava_blue.tga
	surfaceparm lava
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm trans
	tessSize 128
	q3map_surfacelight 1000
	{

		map textures/ghost-custom/protolava_blue.tga
		tcMod scroll 0.05 -0.09
		tcMod turb 0.2 0.1 1 0.09
	}
	{

		map textures/ghost-custom/protolava2_blue.tga
		blendfunc gl_one_minus_dst_color_gl_zero
		tcMod scroll -0.05 0.09
		tcMod turb 0.4 0.1 1 0.2
	}
}
^^this is the shader that crashes

Code: Select all

textures/minions-run14/lava1k
{
        qer_editorimage textures/liquids/lavahell_blue.tga
	surfaceparm lava
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm trans
	tessSize 128
	q3map_surfacelight 1000
	{

		map textures/liquids/lavahell_blue.tga
		tcMod scroll 0.05 -0.09
		tcMod turb 0.2 0.1 1 0.09
	}
	{

		map textures/liquids/lava2_blue.tga
		blendfunc filter
		tcMod scroll -0.05 0.09
		tcMod turb 0.4 0.1 1 0.2
	}
}
^^ this shader works fine.

Re: weird shader problem

Posted: Sun Feb 28, 2010 11:42 pm
by TRaK
I think your blendfunc needs to specify a destination blend. (add gl_one or something to the end of the blendfunc line)
http://www.robotrenegade.com/q3map2/doc ... #blendfunc

Re: weird shader problem

Posted: Mon Mar 01, 2010 1:21 am
by ^Ghost
lol i figured it out,, funny how the smallest error can make the biggest difference...

Code: Select all

   
{
      map textures/ghost-custom/protolava2_blue.tga
      blendfunc gl_one_minus_dst_color_gl_zero
      tcMod scroll -0.05 0.09
      tcMod turb 0.4 0.1 1 0.2
}
^^b4

Code: Select all

   
{
      map textures/ghost-custom/protolava2_blue.tga
      blendfunc gl_one_minus_dst_color _gl_zero
      tcMod scroll -0.05 0.09
      tcMod turb 0.4 0.1 1 0.2
}
^^after

forgot to space out ...dst_color and _gl_zero