Shadow_v2 Op
add shadow capabilities to any material
Summary (oneliner)
This op is an extension for all materials. If attached after one, the material will have the capabilities to receive shadows. Four different shadow algorithms are selectable.
It is also possible to use an opacity mask to discard parts of a mesh ("punch holes" into shadows).
The example on the right is a minimal example for the new Shadow op.
For intermediate examples, please refer to the shadow documentation and these patches:
Multiple occluders: https://cables.gl/p/Iqob_e
Multiple occluders & multiple lights: https://cables.gl/p/Hd5J_e
If you want to see a more advanced example, visit this patch: https://cables.gl/p/M0F2We
- Ops.Gl.ShaderEffects.Shadow_v2
- Core Op - Official cables op
- MIT
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
INPUT PORTS
trigger input
if true, following meshes will cast shadows, if false, following geometries will NOT cast shadows
if true, following meshes will receive shadows
index for algorithm
Shadow Settings
choose between the 4 algorithms: Default, PCF (Percentage-Closer Filtered Shadows), Poisson, VSM (Variance Shadow Mapping)
Shadow Settings
only active when PCF or Poisson algorithm is used: amount of samples taken to soften shadows
distribution of sampled points, the higher the value, the smaller the "wash", if the value is too low, step artefacts can occur
R color channel of the shadow
G color channel of the shadow
B color channel of the shadow
Opacity Settings
alpha threshold for discarding pixels
Opacity Settings
source channel of texture for discarding pixels: r, g, b, a or luminance
alpha texture input
OUTPUT PORTS
trigger output