Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding Emission to particles
#1
Hey there everyone. I wanted to add a glowing effect to my liquid, but finding code to add emission via meta pass to random shaders didnt seem to be working. I dont need any blur lighting effect outside, and I dont need any lighting of nearby surfaces.

I'm hoping you can give me some help as inserting a few similar versions of an emission pass into the ParticleShader.shader has not seemed to work.

Thank you
Reply
#2
(05-02-2021, 03:38 AM)Azimuth Wrote: Hey there everyone. I wanted to add a glowing effect to my liquid, but finding code to add emission via meta pass to random shaders didnt seem to be working. I dont need any blur lighting effect outside, and I dont need any lighting of nearby surfaces.

I'm hoping you can give me some help as inserting a few similar versions of an emission pass into the ParticleShader.shader has not seemed to work.

Thank you

Emission with no blur lighting (bloom) and no lightning on nearby surfaces just reduces to a constant additive term in the lighting equation. You can modify the fluid shader slightly, by adding this line at the end of FluidShader.shader right before the final return:

Code:
fo.color.rgb += half3(0.5f,0,0); // insert here your emission color.

Of course you can get fancy by using a material property instead of a hard-coded variable.

cheers!
Reply