Skip to content

Documentation: Is Hand Modifier

Essentuan edited this page Mar 28, 2026 · 1 revision

Is Hand Modifier (since v0.3.1)

/photonics/modifiers/is_hand_modifier.glsl

Controls whether a given gl_fragCoord is part of the hand. Disabled using PH_IS_HAND_MODIFIER_DISABLED.

The default implementation will handle most cases, but doesn't work if Photonics is rendering at a different resolution compared to the rest of the game.

Usage:

// This example is for when you have a setting to control photonics's render scale independantly from the game.
bool modify_is_hand() {
  const float render_factor = 1f / PHOTONICS_RENDER_SCALE;

  return texelFetch(depthtex0, ivec2(gl_FragCoord.xy * render_factor + 0.5), 0).x < 0.56;
}

Clone this wiki locally