Page MenuHome

Shading: Add Clamp node to Cycles and EEVEE.

Authored by Omar Emara (OmarSquircleArt) on Aug 13 2019, 7:22 PM.


Diff Detail

rB Blender

Event Timeline

To be clear, is this meant instead of adding clamp to Map Range, or just an additional node?

Because I think Map Range should really have it built-in and enabled by default Mainly to avoid creating setups where you remap something to e.g. 0..1 roughness, but then have the values go outside of the 0..1 range by accident and getting weird results. It's also just more convenient to have to specify the output min/max only once and use a single node.

@Brecht Van Lommel (brecht) It is an additional node. A Clamp node has always been in my proposal and was already created months ago in the GSoC branch.

I already have a patch ready for the Clamp option of the Map Range node, but it uses the GPU_link function for EEVEE and the expand function for Cycles, so I am waiting for this patch to land before creating the clamp patch.

This revision is now accepted and ready to land.Aug 13 2019, 10:11 PM