Closed Dawie3565 closed 4 months ago
Bump for higher priority multiple users requested this node for object bounds in 14x and higher
Note SG changed the node name from Oject Position to Object
Bump priority to ASAP per users request.
New node for Object Bounds see comments in original issue posted.
//////////////////////////////////////////////////////////////////////////////////////// /ase_srp_cond_begin:>=140004/
/ase_srp_cond_end/
//////////////////////////////////////////////////////////////////////////////////////// /ase_srp_cond_begin:>=140004/ float3 shadergraph_RendererBoundsWS_Min() { return GetCameraRelativePositionWS(unity_RendererBounds_Min.xyz); } /ase_srp_cond_end/
//////////////////////////////////////////////////////////////////////////////////////// /ase_srp_cond_begin:>=140004/ float3 shadergraph_RendererBoundsWS_Max() { return GetCameraRelativePositionWS(unity_RendererBounds_Max.xyz); } /ase_srp_cond_end/
Bumped to 1.9.3.4 so workflow can be coordinated with changes in URP templates at the same time
Notes from duplicate issue (#269):
Render bounds are available in unity 2022.3 or higher (>=14x) Renderer bounds can only be used in SRPs and if SG is imported. https://docs.unity3d.com/Packages/com.unity.shadergraph@14.0/manual/Object-Node.html
FINALLY done.
Will be included with v1.9.3.4 and requires URP/HDRP 14.0.4 or higher.
Note Unity has "Object node that returns Object scale and position ASE has Node "Object Scale" that returns the object scale
ASE - Object Scale (Object position in world space) New ASE - Object Position (Object scale in world space)
from SRP api 14x an higher Unity's also adds: World Bounds Min (Minimum value of the renderer bounds in world space) World Bounds Max (Maximum value of the renderer bounds in world space) Bounds Size (Size of the renderer bounds)
New ASE - Object Bounds
TYPE.Vec3 WorldBoundsMin WorldBoundsMin = SHADERGRAPH_RENDERER_BOUNDS_MIN;
TYPE.Vec3 WorldBoundsMax WorldBoundsMax = SHADERGRAPH_RENDERER_BOUNDS_MAX;
TYPE.Vec3 BoundsSize BoundsSize = (SHADERGRAPH_RENDERER_BOUNDS_MAX - SHADERGRAPH_RENDERER_BOUNDS_MIN);",