Shadow_v2 Op

Shadow

add shadow capabilities to any material


<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 (&quot;punch holes&quot; 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 &amp; 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>


Full Name
  • Ops.Gl.ShaderEffects.Shadow_v2
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


Example Patch Shadow - Example

Adds shadows to your 3D Models

Open In Editor

INPUT PORTS


Trigger In (Trigger)

<p>trigger input</p>

Cast Shadow (Number:

<i>boolean</i>

)

<p>if true, following meshes will cast shadows, if false, following geometries will NOT cast shadows</p>

Receive Shadow (Number:

<i>boolean</i>

)

<p>if true, following meshes will receive shadows</p>

Algorithm index (Number:

<i>integer</i>

)

<p>index for algorithm</p>

Shadow Settings

Algorithm (String)

<p>choose between the 4 algorithms: Default, PCF (Percentage-Closer Filtered Shadows), Poisson, VSM (Variance Shadow Mapping)</p>

Samples index (Number:

<i>integer</i>

)

Shadow Settings

Samples (String)

<p>only active when PCF or Poisson algorithm is used: amount of samples taken to soften shadows</p>

Sample Distribution (Number:

<i>integer</i>

)

<p>distribution of sampled points, the higher the value, the smaller the &quot;wash&quot;, if the value is too low, step artefacts can occur</p>

R (Number)

<p>R color channel of the shadow</p>

G (Number)

<p>G color channel of the shadow</p>

B (Number)

<p>B color channel of the shadow</p>

Discard Transparent (Number:

<i>boolean</i>

)

Opacity Settings

Opacity Threshold (Number)

<p>alpha threshold for discarding pixels </p>

Alpha Mask Source index (Number:

<i>integer</i>

)

Opacity Settings

Alpha Mask Source (String)

<p>source channel of texture for discarding pixels: r, g, b, a or luminance</p>

Opacity Texture (Object:texture)

<p>alpha texture input</p>

OUTPUT PORTS


Trigger Out (Trigger)

<p>trigger output</p>


Patches using Shadow_v2

  • Examples
  • Public
  • My Patches

Changelog


Ops.User.cables.ShadowModuleWithoutStruct renamed to Ops.Admin.ShadowModuleModifieruser avatarcables - 2020-06-25 16:44
added core lib: cgl_shadermodifieruser avatarcables - 2020-06-30 15:18
Ops.Admin.ShadowModuleModifier renamed to Ops.Gl.ShaderEffects.Shadow_v2user avatarpandur - 2020-07-29 22:47