Skip to content

Instantly share code, notes, and snippets.

@nrrrdcore
nrrrdcore / bending-shadow.css
Last active April 22, 2024 20:54
Simple Bended-Shadow CSS: Create the Bended Photo Effect without writing a million divs.
.bended-shadow {
position: relative;
width: 500px;
margin: 200px auto;
}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;
@Priva28
Priva28 / CRTEffect.metal
Last active July 17, 2024 08:38
SwiftUI CRT effect using metal shaders.
#include <metal_stdlib>
#include <SwiftUI/SwiftUI.h>
using namespace metal;
float2 distort(float2 uv, float strength) {
float2 dist = 0.5 - uv;
uv.x = (uv.x - dist.y * dist.y * dist.x * strength);
uv.y = (uv.y - dist.x * dist.x * dist.y * strength);
return uv;
}