2026-06-09 룸 프로토타입 디자인 (진행중)

This commit is contained in:
skrwns304@gmail.com
2026-06-09 20:53:26 +09:00
parent 3a18351d17
commit 4c955dafc3
3544 changed files with 226503 additions and 17 deletions

View File

@@ -0,0 +1,30 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
#ifndef PROJECTION_UTILS_INCLUDED
#define PROJECTION_UTILS_INCLUDED
//Position, relative to rendering bounds (normalized 0-1)
float2 WorldToProjectionUV(float3 positionWS, float2 origin, float size)
{
return (positionWS.xz - origin.xy) / size;
}
float ProjectionEdgeMask(float3 positionWS, float2 origin, float size, float blendDistance)
{
const float extents = (size * 0.499);
//Shift to origin
positionWS = positionWS - extents;
const float2 boundsMin = origin.xy - extents;
const float2 boundsMax = origin.xy + extents;
float2 weightDir = min(positionWS.xz - boundsMin, boundsMax - positionWS.xz) / blendDistance;
return saturate(min(weightDir.x, weightDir.y));
}
#endif