A downloadable shader

Download NowName your own price

This shader allows you to remap the intensity and color of incoming lighting. You can use it to create stylized lighting effects such as toon shading. Simply provide a texture that represents the color and intensity from left (darkest) to right (brightest), you can use Godot's GradientTexture for this.


I'll continue to refine and add features this shader, stay tuned for updates

This shader works by calculating the luminance of the incoming lighting. It then uses the value as the U coordinate of the Luma Map and uses the color it finds as the light value. This allows you to arbitrarily remap the incoming lighting via a texture.

Features:

  • Control light intensity and color with a Luma Map texture to create stylized lighting, from increasing contrast to toon shading. You can even create reverse lighting!
  • Try packing multiple gradients into a Luma Map texture, you can select between them with V Index
  • Tint the Luma Map to tint all incoming lighting, you can use this to create a base solid color without any textures needed
  • Scale the incoming lighting to control its intensity with Luma Amount
  • Optional rim lighting based on light intensity - rim lighting will be more prominent on more brightly lit areas. Control rim lighting size and intensity
  • Colored lights are supported - you can use many lights with different colors at the same time. Light colors will blend with each other additively
  • Lighting can be fully affected by shadows and will behave predictably and consistently
  • Support for specular, metallic, and roughness
  • Support for normal mapping, including control over normal map intensity
  • Supports GLES2 and GLES3

I was inspired to create this shader when I was looking for a way to replicate the Source Engine's Lightwarp feature, used prominently in Team Fortress 2 to achieve its stylized look which can be seen in section 5 of this technical paper, referred to as Diffuse Warping

No attribution of any kind is required, but it would be appreciated

Download

Download NowName your own price

Click download now to get access to the following files:

LumaMapped.shader 2.2 kB

Leave a comment

Log in with itch.io to leave a comment.