Skip to content

Align with latest changes - #26

Open
freezy wants to merge 7 commits into
masterfrom
player-align
Open

freezy wants to merge 7 commits into
masterfrom
player-align

Conversation

@freezy

@freezy freezy commented Sep 17, 2026

Copy link
Copy Markdown
Member

No description provided.

Introduce a dedicated VisualPinball.Engine.Unity.Urp.Editor assembly
and move MaterialAdapter and PrefabProvider into it. Their
IMaterialAdapter and IPrefabProvider members are now exposed through a
new UniversalRenderPipelineConverter (IRenderPipelineConverter) rather
than the runtime UniversalRenderPipeline, keeping editor-only authoring
concerns out of the runtime assembly.
Turn portable VpeMaterialProfiles from a .vpe package into live
URP/Lit materials in the Player, replacing glTFast placeholders.
This is the URP counterpart of HdrpMaterialResolver: handle base
color/map, metallic/smoothness, HDRP-style mask map split into
URP metallic-gloss + occlusion, normal map, emissive, and
surface/blend state. Shadergraph types and decals fall back to a
plain lit build or are left to glTFast.

Register the resolver before scene load via a bootstrap, mirroring
the HDRP package.
URP computes smoothness as mask.a * _Smoothness, while HDRP uses
lerp(remapMin, remapMax, mask.a) and ignores the scalar when a mask
is set. Set _Smoothness to the remap max so mask.a drives smoothness
fully instead of being scaled down by the mask-irrelevant scalar.
Map authored HDRP-physical values into URP's unitless lighting via a
single ReferenceEv100 scale (UrpPhysicalUnits): emissives from nits and
punctual/directional lights from candela/lux, the latter registered as a
VpeLightUnitAdjuster at bootstrap.

Implement emissive color/intensity on the URP MaterialConverter using
_EmissionColor (chroma × intensity), replacing the earlier no-op stubs so
LightComponent can drive faux bulbs and inserts.

Add insert material support: transmittance/base color becomes the body
color and the lamp glow becomes emission driven at runtime, approximating
HDRP translucency that URP lacks.
Handle VpeMaterialTypes.Decal by rendering the decal mesh as an
alpha-blended lit overlay, since URP's decal system only supports
projectors. The base-map alpha drives where the decal applies, with
HDRP's Decal Blend folded into the base alpha and mask/normal map
reuse mirroring BuildLit.
Bump ReferenceEv100 to 5 (A/B'd against the HDRP player under a
neutral HDRI) and add a separate EmissiveExtraEv stop so bloom-hot
faux bulbs match HDRP while GI lamps stay in line. LightScale now
derives from ReferenceEv100 alone, excluding the emissive-only stop.

Add LightRangeMultiplier to widen point/spot ranges, letting the
overlapping direct pools stand in for HDRP's missing SSGI bounce
while still following lamp state.
@freezy freezy self-assigned this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant