weird shader problem

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
^Ghost
Posts: 230
Joined: Tue Sep 08, 2009 3:35 am

weird shader problem

Post 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.
[url=https://github.com/Garux/netradiant-custom]NRC[/url]
[url=https://defrag.racing/]Defrag[/url]
[url=http://ws.q3df.org/]Q3 Map Archive[/url]
TRaK
Posts: 8
Joined: Sun May 10, 2009 1:56 am

Re: weird shader problem

Post 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
[url=http://trak.mercenariesguild.net/]Website[/url]
^Ghost
Posts: 230
Joined: Tue Sep 08, 2009 3:35 am

Re: weird shader problem

Post 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
[url=https://github.com/Garux/netradiant-custom]NRC[/url]
[url=https://defrag.racing/]Defrag[/url]
[url=http://ws.q3df.org/]Q3 Map Archive[/url]
Post Reply