That would be cool but am I right in saying that they couldn't actually be added to the game as additional choices rather than replacements?
For lava, I imagine that something quite subtle like a heat haze effect might be quite neat.
			
			
									
						
										
						Is shader editing possible?
Moderator: Graf Zahl
- 
				Enjay
														 - Developer

 - Posts: 4759
 - Joined: Tue Aug 30, 2005 23:19
 - Location: Scotland
 
- 
				krumzy
 - Posts: 23
 - Joined: Wed Aug 01, 2012 10:13
 
Re: Is shader editing possible?
They can, because all i am doing is replacing warp2.Enjay wrote:That would be cool but am I right in saying that they couldn't actually be added to the game as additional choices rather than replacements?
For lava, I imagine that something quite subtle like a heat haze effect might be quite neat.
- 
				Rachael
														 - Developer

 - Posts: 3651
 - Joined: Sat May 13, 2006 10:30
 
Re: Is shader editing possible?
You could just define a new one couldn't you? Last time I looked at GLDEFS you could just use arbitrary custom shaders.
			
			
									
						
										
						- 
				Enjay
														 - Developer

 - Posts: 4759
 - Joined: Tue Aug 30, 2005 23:19
 - Location: Scotland
 
Re: Is shader editing possible?
Yes, that's what I meant. All that's happening is that WARP2 is being replaced. So, I no longer have WARP2. I have WARP and WARP2.1 only. I don't have WARP, WARP2 and WARP3.krumzy wrote:They can, because all i am doing is replacing warp2.
Though, if what Eruanna says is correct, then it may be that possible extra ones can be added.
[edit]Hmmm I tried renaming the function to warp3 and then using warp3 in animdefs but that complained of a syntax error in animdefs. I'm not sure what else should be changed (if anything)[/edit]
- 
				Blue Shadow
 - Global Moderator

 - Posts: 308
 - Joined: Sun Aug 29, 2010 6:09
 
Re: Is shader editing possible?
If I understand that correctly, the application is done from within GLDEFS as opposed to ANIMDEFS for custom shaders.ZDoom Wiki wrote:The second step to implementing custom fragment shaders is to define a HardwareShader entry in GLDEFS. Only one shader can be defined per valid graphic. A definition takes the following form:
[Type] is an optional and is one of either Flat, Sprite, Texture. This is useful to prevent ambiguity if the same name is used by several graphics of different kinds. <LumpName> corresponds to the graphic to which it is applied. <File> corresponds to the text lump containing your Process function. <Value> is a floating point value that defines a multiplier to be applied to the timer uniform.Code: Select all
HardwareShader [Type] <LumpName> { Shader "<File>" Speed <Value> }
- 
				Graf Zahl
														 - GZDoom Developer

 - Posts: 7148
 - Joined: Wed Jul 20, 2005 9:48
 - Location: Germany
 
Re: Is shader editing possible?
Precisely, since they are an OpenGL feature.
			
			
									
						
										
						- 
				Enjay
														 - Developer

 - Posts: 4759
 - Joined: Tue Aug 30, 2005 23:19
 - Location: Scotland
 
Re: Is shader editing possible?
Ah, OK.  That suddenly makes things a lot more useful.  Or rather, it doesn't make them any more useful at all but it lets me know that they are far more useful than I thought they were. 
			
			
									
						
										
						- 
				krumzy
 - Posts: 23
 - Joined: Wed Aug 01, 2012 10:13
 
Re: Is shader editing possible?
So for <File> i put the file name and it came up with this:Blue Shadow wrote:If I understand that correctly, the application is done from within GLDEFS as opposed to ANIMDEFS for custom shaders.ZDoom Wiki wrote:The second step to implementing custom fragment shaders is to define a HardwareShader entry in GLDEFS. Only one shader can be defined per valid graphic. A definition takes the following form:
[Type] is an optional and is one of either Flat, Sprite, Texture. This is useful to prevent ambiguity if the same name is used by several graphics of different kinds. <LumpName> corresponds to the graphic to which it is applied. <File> corresponds to the text lump containing your Process function. <Value> is a floating point value that defines a multiplier to be applied to the timer uniform.Code: Select all
HardwareShader [Type] <LumpName> { Shader "<File>" Speed <Value> }
Code: Select all
Unable to load shader func_warp3::colormap:
Unable to load 'func_warp3'(also i know that zandronum doesn't define hardwareshaders so how could i convert this to zandronum?)
- 
				Gez
														 - Developer

 - Posts: 1399
 - Joined: Mon Oct 22, 2007 16:47
 
Re: Is shader editing possible?
Yes.krumzy wrote:Do i have to add the location of the file as well?
You make a fork of Zandronum in which you port the relevant code from GZDoom.krumzy wrote:(also i know that zandronum doesn't define hardwareshaders so how could i convert this to zandronum?)
There are no other options. This isn't something that can be "converted" into other features.
- 
				Rachael
														 - Developer

 - Posts: 3651
 - Joined: Sat May 13, 2006 10:30
 
Re: Is shader editing possible?
You might also see if Zandronum's coding team is willing to port it for you, but I would imagine they're more than likely very busy with other projects right now. But they do have a bug tracker you can use and you can point to this topic.