Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

⚡️WebGPU Glass Material Update See it live: This new #threjs material provides extra depth by adding recursive transmission support, allowing glass objects to see and refract other glass and transparent surfaces, also bringing chromatic aberration and full #webgpu / TSL compatibility. More about it in the comments 😊

16,551 görüntüleme • 14 gün önce •via X (Twitter)

0 Yorum

Yorum bulunmuyor

Orijinal gönderinin yorumları burada görünecek

Benzer Videolar

🚨 A WOMAN WAS RUSHED TO THE ER AFTER HER GLASS STRAW SNAPPED - AND A SHARD ENDED UP INSIDE HER STOMACH "Don't use glass straws... it's not worth it." A woman posted a PSA after a glass drinking straw broke mid-sip and the story is absolutely horrifying. She swallowed something sharp, checked the straw, and realized a chunk of glass was missing. Two hours later she burped… and blood filled her mouth. At the ER, doctors didn’t take it seriously until a gastro specialist saw the scan and told them to rush her into emergency care. • A shard of glass was sitting in her stomach • They put her under anesthesia to retrieve it • By the time they went in… the shard was GONE • It had already moved into her intestines • Now she has to watch for internal bleeding for 48 hours • And check every bowel movement to see if it passes • She can’t remove the TikTok Shop video she made promoting the straws • And she’s warning everyone to THROW THEM OUT immediately People in the comments are freaking out: “NOPE. Plastic only from now on.” “TikTok Shop about to deactivate glass straws in 3… 2… 1…” “I didn’t even know they could BREAK like that.” “Internal bleeding is my worst nightmare.” “This is exactly why I never bought those things.” Glass straws were supposed to be the “eco-friendly upgrade”… but this video has people rethinking that real fast. Are you tossing every glass straw in your house after watching this?

HustleBitch

85,261 görüntüleme • 8 ay önce

🧑‍🏫 How to make a glass/refraction shader: 🍷 Refraction will ultimately have the effect that whatever is behind your mesh should appear distorted by the surface of the mesh itself. We're not going for external caustics projection, just modelling glass-like, distorting "transparency". 🌆 In Unity, you can sample the *global* _CameraOpaqueTexture (make sure it's enabled in your URP asset settings), which is what your scene looks like rendered without any transparent objects. In Shader Graph, you can simply use the Scene Colour node. 🔢 The UVs required for this texture are the normalized screen coordinates, so if we offset/warp/distort these coordinates and sample the texture, we ultimately produce a distorted image. We can offset the UVs by some normal map, as well as a refraction vector based on the direction from the camera -> the vertex/fragment (flip viewDir, which is otherwise vertex/fragment -> camera) and normals of the object. 📸 Input the (reversed) world space view direction and normal into HLSL refract. **Convert the refraction direction vector to tangent space before adding it to the screen UV.** Use the result to sample _CameraOpaqueTexture. refract(-worldViewDirection, worldNormal, eta); eta -> refraction ratio (from_IOR / to_IOR), > for air, 1.0 / indexOfRefraction (IOR). IOR of water = 1.33, glass = 1.54... 💡 You can also do naive "looks about right" hacks: fresnel -> normal from grayscale, which can be used for distortion. Or distort it any other way (without even specifically using refract at all), really... 🧠 Thus, even if your object is rendered as a transparent type (and vanilla Unity URP will require that it is), it is fully 'opaque' (max alpha), but it renders on its surface what is behind it, using the screen UV. If you distort those UVs by the camera view and normals of the surface it will be rendered on, it then appears like refractive glass on that surface. > Transparent render queue, but alpha = 1.0.

Mirza Beig

125,253 görüntüleme • 1 yıl önce