Frictional Games Forum (read-only)

Full Version: Modifying the illumination Shader
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 :]

[Image: glow-low.jpg]
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!
----->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 Smile

http://devmaster.net/posts/3100/shader-e...-and-bloom
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.
I have found more links:

http://www.gamerendering.com/2008/10/11/...er-shader/

http://stackoverflow.com/questions/57631...ack-screen


By what you are telling me, blur could do the trick. Try mixing a bit of both bloom and blur shaders and I think you'll get what yiou want Smile
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?
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 Sad
(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.
No cigar. Thanks everyone! Especially Adrianis/Palistov on skype!