11 Commits

Author SHA1 Message Date
DeMuenu
9d7a24113e Fixed default Shader Variable 2025-10-05 14:38:21 +02:00
DeMuenu
65c34d2ddf Refactor light range and angle calculations
Updated how light range and spot angle are calculated and packed for both editor and runtime scripts, distinguishing between sphere and non-sphere lights. Adjusted shader logic to use new packing for spot light contribution, improving consistency between CPU and GPU representations.
2025-10-04 04:10:43 +02:00
DeMuenu
bb31145e4d smooth falloff, but not correct angles
Replaced usage of GetCosHalfAngle() with spotAngleDeg for spot light calculations in both editor and runtime scripts. Updated shader logic to use smoothstep for light contribution falloff, improving spot light edge smoothness.
2025-10-03 23:27:27 +02:00
DeMuenu
b26c189b89 Rename PlayerPositionsToShader to LightUpdater
Renamed all references, scripts, and editor helpers from PlayerPositionsToShader to LightUpdater for improved clarity and consistency. Updated README and editor preview documentation to reflect the new naming. Added new shader Standard_Lightmap_2SP for enhanced lighting and shadow support.
2025-10-02 20:25:59 +02:00
DeMuenu
0e633983cf Refactor shadowcaster to use explicit plane basis
Replaces the use of world-to-local matrices for shadowcaster planes with explicit plane origin, basis, and normal vectors in both C# and shader code. Updates property setting in ShadowcasterUpdater and its editor preview, and rewrites the shadow sampling function in the shader include to use the new basis. Adjusts all affected shaders to use the new properties and sampling function for improved clarity and flexibility.
2025-10-01 13:26:33 +02:00
DeMuenu
fd5eb748e2 Add support for multiple shadowcaster planes
Extended ShadowcasterUpdater and shaders to handle multiple shadowcaster planes by introducing indexed properties and logic for two shadowcaster sets. Updated property names and shader logic to support per-index shadowcaster textures, colors, and brightness, enabling more flexible shadow casting in scenes.
2025-09-30 12:59:56 +02:00
DeMuenu
868e713336 Add shadowcaster support to lighting and shaders
Introduces shadowcaster support by adding shadow map index fields to light data, updating PlayerPositionsToShader and LightdataStorage to handle shadow map indices, and extending the shader and its includes to sample shadowcaster planes. Adds ShadowcasterUpdater script and editor preview for updating world-to-local matrices, and updates relevant arrays and property handling throughout the codebase. Also adds a sample plane mesh for shadowcasting.
2025-09-29 23:14:38 +02:00
DeMuenu
8780f50ebc Fixed stuff I broke by merging :-P
also twerked the waves a bit
2025-09-27 01:04:28 +02:00
DeMuenu
b94c52da3c Rename shader light variables to Udon-prefixed versions
Updated all relevant shader files and C# script to use Udon-prefixed light and player variables (e.g., _Udon_LightPositions, _Udon_LightColors, _Udon_PlayerCount) for consistency and to avoid naming conflicts. This change affects variable declarations, macro definitions, and all usages in BlendinShader, LitParticles, Water shaders, and included HLSL files.
2025-09-26 23:13:06 +02:00
DeMuenu
c7e2397d81 Update shader property handling for VRCShader API
Changed shader property names to use '_Udon_' prefix and switched to using VRCShader.PropertyToID and VRCShader.SetGlobal* methods for setting shader properties. Added update throttling in LateUpdate for performance. These changes improve compatibility and efficiency with the VRC SDK3 Rendering API.
2025-09-26 17:31:00 +02:00
DeMuenu
c5adc24bb0 Initial commit 2025-09-24 09:41:56 +02:00