quick shader trick! 🕯️ > how to render something 'behind' a surface, with parallax! Like a candle in a lantern. We'll be placing a soft circle in screen space, at a relative 3D position in the model (with world-constant scale) 🧵0/7
3
8
40
4K
19
Download Video
I'll be using Lens Studio (@SnapAR), but this works with any shader graph or GLSL code all subgraphs can be downloaded from my git github.com/max-van-leeuwe… 3D model by Pixel Life Studio sketchfab.com/3d-models/old-… 🧵1/7
Start by converting your custom Object Position ('pos', vec3) into a Screen Position ('screen', vec2) -> clip = vec4(pos, 1) * projection * view * world -> screen = clip / clip.w (github.com/max-van-leeuwe…) Then, scale it by the screen ratio to make the coords square! 🧵2/7