Shadow_v2 Op
add shadow capabilities to any material
Summary (oneliner)
<p>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. </p> <p>It is also possible to use an opacity mask to discard parts of a mesh ("punch holes" into shadows).</p> <p>The example on the right is a minimal example for the new Shadow op.</p> <p>For intermediate examples, please refer to the shadow documentation and these patches:</p> <p>Multiple occluders: <a href="https://cables.gl/p/Iqob_e">https://cables.gl/p/Iqob_e</a></p> <p>Multiple occluders & multiple lights: <a href="https://cables.gl/p/Hd5J_e">https://cables.gl/p/Hd5J_e</a></p> <p>If you want to see a more advanced example, visit this patch: <a href="https://cables.gl/p/M0F2We">https://cables.gl/p/M0F2We</a></p>
- 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
<p>trigger input</p>
<i>boolean</i>
)<p>if true, following meshes will cast shadows, if false, following geometries will NOT cast shadows</p>
<i>boolean</i>
)<p>if true, following meshes will receive shadows</p>
<i>integer</i>
)<p>index for algorithm</p>
Shadow Settings
<p>choose between the 4 algorithms: Default, PCF (Percentage-Closer Filtered Shadows), Poisson, VSM (Variance Shadow Mapping)</p>
<i>integer</i>
)Shadow Settings
<p>only active when PCF or Poisson algorithm is used: amount of samples taken to soften shadows</p>
<i>integer</i>
)<p>distribution of sampled points, the higher the value, the smaller the "wash", if the value is too low, step artefacts can occur</p>
<p>R color channel of the shadow</p>
<p>G color channel of the shadow</p>
<p>B color channel of the shadow</p>
<i>boolean</i>
)Opacity Settings
<p>alpha threshold for discarding pixels </p>
<i>integer</i>
)Opacity Settings
<p>source channel of texture for discarding pixels: r, g, b, a or luminance</p>
<p>alpha texture input</p>
OUTPUT PORTS
<p>trigger output</p>