When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}| float2 WorldToScreenPos(float3 pos){ | |
| pos = normalize(pos - _WorldSpaceCameraPos)*(_ProjectionParams.y + (_ProjectionParams.z - _ProjectionParams.y))+_WorldSpaceCameraPos; | |
| float2 uv =0; | |
| float3 toCam = mul(unity_WorldToCamera, pos); | |
| float camPosZ = toCam.z; | |
| float height = 2 * camPosZ / unity_CameraProjection._m11; | |
| float width = _ScreenParams.x / _ScreenParams.y * height; | |
| uv.x = (toCam.x + width / 2)/width; | |
| uv.y = (toCam.y + height / 2)/width; | |
| return uv; |
| #!/usr/bin/env bash | |
| # first we prune origin to ensure our local list of remote branches is up to date | |
| git remote prune origin | |
| GONE_BRANCHES=$(git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}') | |
| if [ -z "$GONE_BRANCHES" ]; then | |
| echo "Could not find any local branches that have a gone remote" | |
| exit 0 |