Acies 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,643 
	Threads: 60 
	Joined: Feb 2011
	
 Reputation: 
73
		
	 | 
	
		
			
Modifying the illumination Shader 
			 
			
				Hi! 
I have been trying to change the illumination shader: 
Amnesia - The Dark Descent\redist\core\deferred_illumination_frag.glsl
 
to have bloom. But I'm not a good coder, nor do I know if it's actually possible to do - which is why I'm turning to you :]
  
http://devmaster.net/posts/3100/shader-e...-and-bloom
Something similar to this. The reason I'm asking is because while making Spacies I have a lot of illuminated models and textures. Spamming billboards works, but billboards look bad from certain angles and doesn't work in all sitautions.
 
One idea I had was to replace the illumination shader with the shader for 'itemglow' - it didn't seem to do the trick though.
 
Any help or (informed) opinion on why it's not possible is appreciated. Thanks!
			  
			
			
 
 ![[Image: mZiYnxe.png]](http://i.imgur.com/mZiYnxe.png)  ジ
  
			
		 |  
	 
 | 
 
	| 09-30-2013, 03:03 PM  | 
	
		
	 | 
 
 
	
		
		The chaser 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 2,486 
	Threads: 76 
	Joined: Jun 2012
	
 Reputation: 
113
		
	 | 
	
		
			
RE: Modifying the illumination Shader 
			 
			
				----->gl_FragColor = texture2D(aDiffuse, gl_TexCoord[0].xy) * afColorMul; 
I'm not a coder, but something tells me here's the secret... maybe, if you changed something from "* afColorMul" it would look brighter. Try "* afColorMul;" multiplied by two or three.
 
I have found this, it might be useful   
http://devmaster.net/posts/3100/shader-e...-and-bloom
			 
			
			
 
                              THE OTHERWORLD (WIP) 
 
Aculy iz dolan.  
			
		 |  
	 
 | 
 
	| 09-30-2013, 09:04 PM  | 
	
		
	 | 
 
 
	
		
		Acies 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,643 
	Threads: 60 
	Joined: Feb 2011
	
 Reputation: 
73
		
	 | 
	
		
			
RE: Modifying the illumination Shader 
			 
			
				Hehe thanks. It's not brightness, but bloom I'm looking for (adjusting the values wouldn't help much). Basically, instead of having to use billboards the illumination map is blurred and 'shown in the air as light' - not purely on the surface of the texture. 
 
The link is nice - included in the main post ;D 
 
If it is to work one would have to write new code, or somehow modify the 'item glow' code.
			 
			
			
 
 ![[Image: mZiYnxe.png]](http://i.imgur.com/mZiYnxe.png)  ジ
  
			
		 |  
	 
 | 
 
	| 09-30-2013, 10:41 PM  | 
	
		
	 | 
 
 
	
		
		The chaser 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 2,486 
	Threads: 76 
	Joined: Jun 2012
	
 Reputation: 
113
		
	 | 
	
		
 | 
 
	| 10-01-2013, 06:47 AM  | 
	
		
	 | 
 
 
	
		
		Adrianis 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 620 
	Threads: 6 
	Joined: Feb 2012
	
 Reputation: 
27
		
	 | 
	
		
			
RE: Modifying the illumination Shader 
			 
			
				Problem is, the shaders seem to be applied to things with in-engine code, correct me if I'm wrong but there's no way to 'apply' any of the available shaders manually, so adding shaders won't work. 
 
Problem with changing the code of the existing ones, assuming you could get around the errors from not having control over the process, is that all of those articles suggest you need to apply several shaders to get that effect. 
 
There is a bloom shader in the core\shaders folder, including the vertex & blur frag shaders & the other one to tie them together (i really have little idea how this works btw), so it seems like it's all there, but back to problem 1 ... how to apply it?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 10-01-2013, 09:23 PM  | 
	
		
	 | 
 
 
	
		
		palistov 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,208 
	Threads: 67 
	Joined: Mar 2011
	
 Reputation: 
57
		
	 | 
	
		
			
RE: Modifying the illumination Shader 
			 
			
				Doesn't appear to be possible. The illumination pass is a simple render pass that appears to simply render the illumination texture into the framebuffer. What needs to be done for this glowmap technique requires modifying the native code to get a new glow-map render pass. This technique renders a glowmap into a texture, which you then blend into the final framebuffer in a separate pass. So unless you are an incredibly talented hacker....no cigar   
			 
			
			
 
			
		 |  
	 
 | 
 
	| 10-01-2013, 09:54 PM  | 
	
		
	 | 
 
 
	
		
		The chaser 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 2,486 
	Threads: 76 
	Joined: Jun 2012
	
 Reputation: 
113
		
	 | 
	
		
			
RE: Modifying the illumination Shader 
			 
			
				 (10-01-2013, 09:23 PM)Adrianis Wrote:  Problem is, the shaders seem to be applied to things with in-engine code, correct me if I'm wrong but there's no way to 'apply' any of the available shaders manually, so adding shaders won't work. 
 
Problem with changing the code of the existing ones, assuming you could get around the errors from not having control over the process, is that all of those articles suggest you need to apply several shaders to get that effect. 
 
There is a bloom shader in the core\shaders folder, including the vertex & blur frag shaders & the other one to tie them together (i really have little idea how this works btw), so it seems like it's all there, but back to problem 1 ... how to apply it? 
Maybe you could make an IFC with all the "core" shaders in a folder, just like an Amnesia inside an Amnesia. The changed shaders would be there, and would be used just for the IFC.
			  
			
			
 
                              THE OTHERWORLD (WIP) 
 
Aculy iz dolan.  
			
		 |  
	 
 | 
 
	| 10-01-2013, 09:56 PM  | 
	
		
	 | 
 
 
	
		
		Acies 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,643 
	Threads: 60 
	Joined: Feb 2011
	
 Reputation: 
73
		
	 | 
	
		
			
RE: Modifying the illumination Shader 
			 
			
				No cigar. Thanks everyone! Especially Adrianis/Palistov on skype!
			 
			
			
 
 ![[Image: mZiYnxe.png]](http://i.imgur.com/mZiYnxe.png)  ジ
  
			
				
(This post was last modified: 10-01-2013, 10:01 PM by Acies.)
 
				
			 
		 |  
	 
 | 
 
	| 10-01-2013, 10:01 PM  | 
	
		
	 | 
 
 
	 
 |