Shadows - michaliskambi/x3d-tests GitHub Wiki
Enable shadows specification in X3D:
-
Consider Castle Game Engine "shadows" SFBool field ( https://castle-engine.sourceforge.io/x3d_extensions_shadow_maps.php#section_light_shadows_on_everything )
-
Or, consider InstantReality "shadowIntensity" field ( http://doc.instantreality.org/tutorial/dynamic-shadows/ ). I like InstantReality approach, and would gladly add "shadowIntensity" version to Castle Game Engine too. Although it's not physically-correct (in reality, if the light is completely obscured, then you're always 100% in shadow...), and would be troublesome for shadow volumes implementation.
Many browsers implement shadows, but with varying levels of capabilities, various implementations. That's understandable, as there's no "perfect algorithm for real-time shadows", at least today. It suggests that it's better to "start carefully" in the X3D specification. Maybe include only a simple field (like "shadows" or "shadowIntensity"), and delegate more improvements to future versions of the standard.