3D Color Ramp Light Shader 1.0

(1 customer review)
Add to wishlistAdded to wishlistRemoved from wishlist 9
Add to compare
Sold by
Saint
@ Saint

Simple 3D color ramp/palette lighting shader

FREE

Report Abuse
Gotot version: 3.2 Categories: , , , Tags: , , , ,

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.)

IMPORTANT

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

Version

1 review for 3D Color Ramp Light Shader

5.0 out of 5
1
0
0
0
0
Write a review
Show all Most Helpful Highest Rating Lowest Rating
  1. haph aja (verified owner)

    Best Color ramp ever

    + PROS: can do color ramp
    - CONS: nothing
    Helpful(0) Unhelpful(0)You have already voted this

    Only logged in customers who have purchased this product may leave a review.

    Vendor Information

    • Store Name: Saint
    • Vendor: Saint
    • No ratings found yet!
    No product has been found!

    Product Enquiry

    Please Login to make enquiry about this product

    10% OF REVENUE IS DONATED TO GODOT

    Reset Password
    Compare items
    • Total (0)
    Compare