3D Color Ramp Light Shader 1.0
Simple 3D color ramp/palette lighting shader
This is a 3D lighting shader which takes in a gradient texture/.PNG (example below) and shades the material based on the amount of light received in the scene.
How to use:
Assign the shader to a material like usual and open the shader parameters
You can assign “Base Ramp” any kind of .PNG gradient texture (the size and dimensions of the .PNG does not matter and it can be any number of colors, though it needs to be all in one line rather than “rows” of colors. Most “palette creation” sites and software already do this. Example: https://lospec.com )
(For example, this .PNG will work great and can be dragged right into “Base Ramp”. Godot will automatically import it as a stream texture.)
Make sure you import your .PNG with “Filter” unchecked in the import tab. If you already have your .PNG assigned to “Base Ramp” you can easily select the .PNG in filesystem tab then uncheck “Filter” on the import tab and click the “Reimport” button to apply the change. If this is not done then colors may be off or missing when rendering.
You can also assign “Base Ramp” a custom made gradient texture in Godot. Just be sure to set the “width” of the gradient to the total amount of colors in the palette.
That is all you have to do. Few important things:
- Ambient light is set to be disabled for this shader, so your lighting source should come from any of the built in Godot light nodes (Directional light, Omnilight, etc…)”Default Color” is the color of the material when no light is being detected. You can set this to be anything for testing purposes or just make it transparent.
- The shader “reads” the provided palette/gradient from left -> right. You can enable “Reverse” to have it read right -> left (this can be used for gradients found online where the gradient starts with lighter colors and ends with darker colors)
- Shader should work with any amount of palette colors, as long as all the colors are on one row.
- You can use .PNGs with 1px width of colors to save on resources if concerned with optimization.
Specification: 3D Color Ramp Light Shader
Only logged in customers who have purchased this product may leave a review.
- Store Name: Saint
- Vendor: Saint
- No ratings found yet!