I have been putting off showing off anything I have been working on till I was happy enough with it, but that will be never, so I thought I would just bit the bullet and put up a video. I ripped out a quick rim light shader this afternoon that I think is very effective, I would be happy to share it/contribute if anyone was interest. (it inspired me to make the vid)
The rim lighting is being applied to the big growing shere, there is subtle white rim light on the main character, a bright orange one around the bot. No post proccessing (besides pssm) is being applied as it makes the rim light less obviouse (great in production, bad when trying to demonstrait said rim shader).
love to get some feedback/questions :)
@normen thanks man. and cheers for all your help along the way, I have no doubts I will be calling on it again
@ryuu performance appears excellent (without any actual testing) , disabling the effect made virtually no difference to FPS in this project. I will run some proper benchmarks if it ends up being shared
Hi, @thetoucher !!! Actually, Iām interested in your shader. At present, I collect and develop shaders for JME3. If you share your shaders, so I will put them in my repository. Also, I can give you an access to my repository as a developer.
not sure. When doing the above tests, the frame rate did change between light on or off.
Some Possible Uses :
Highlighting objects :: door knobs, chests, weapons ect⦠good for āpickingā
works well in cartoon looking scenes to brighten edges
can be used for velvet effects.
great for xray effects
I have simply added a few lines to standard Lighting shader, so I will try and show what I did. Im not really sure the best way to share my code so I will just show all the changes I have made as best I can, and if someone could please halp advise me the best way to go from here Iām sorry if this is in the wrong place or is unclear.
mat.setColor(āRimLightingā, new ColorRGBA(red,green,blue,power));[/java]
The RimShader is a Color, alhpa is used as the āpowerā, the higher the power the greater the effect. power must be > 0.
There is room to add some more customization to the appears by passing in a bias and additional power. There is probably plenty of room for optimization as well.
@Momoko_Fan what do you think, we should add this to the lighting shader, could make some neat effect for global illumination and like the toucher said can be used in many ways like selection.
Also itās a good candidate for shader injection, isnāt it?
Thank you, cool effect! I will add your shader to my LightBlow shader. If you want i can add any information about you or any resource. That effect is something like in Left4Dead2.
I noticed a bug, i think the rim lighting is being applied multiple times, once per light, I havenāt had a chance to open up the code yet to confirm or fix but I think it makes sense, I will have a look at fixing this in my lunch time (damn work)
Yes, the lighting shader is multipass, so it runs once per (non-ambient) light, it also runs once if the only thing you have is ambient lights in the scene.
This was the easiest way I could figure out how get my code to execute once per frame in a multipass shader, I would love for some advice from some smart devs ( Momoko ) on the correct way to do this, it was a pain to figure out and I know its wrong.
I guess its okay. Just make sure the ambient is really set ⦠Maybe we can set the alpha on the ambient color to 1 if its the first light, and then set to 0 for subsequent lights