New advertisers: 50% off your first month with code FIRSTMONTHSee slots
enzed avatar

R3f Materials

Choosing React Three Fiber materials for PBR, transparency, and transmission, with shader guidance split out separately.

skills.sh installs
2.2K
GitHub stars
138
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers material selection from unlit basic through standard, physical, toon, and custom ShaderMaterial or node materials
  • Includes a PBR example with a procedural Drei Environment and Lightformer so no remote preset is needed
  • Enforces color-space rules: albedo and emissive maps use sRGB, while roughness, metalness, normal, and AO maps use NoColorSpace
  • Designed for developers styling meshes who must weigh visual fidelity against GPU cost, with WebGL and WebGPU differences noted

Install

$ npx -y skills add enzed/r3f-skills --skill r3f-materials -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

React Three Fiber materials

Inspect the installed renderer, Three.js, Fiber, and Drei versions first. Examples use Fiber 9 / React 19 with WebGL. Do not assume Drei shader-based materials work unchanged with WebGPU.

Choose the least complex material that fits

NeedStarting pointConstraint
Unlit artwork or UI surfacemeshBasicMaterialStill participates in output color/tone-mapping policy
Ordinary PBR surfacemeshStandardMaterialMetals especially need an environment or suitable lights
Clearcoat, transmission, sheenmeshPhysicalMaterialEnable only needed features; more shader work
Stylized lightingmeshToonMaterialNeeds lights; gradient maps need appropriate filtering
Normal debuggingmeshNormalMaterialUseful for geometry/normal inspection
Custom shadingShaderMaterial or node materialMatch WebGL/GLSL versus WebGPU/TSL

PBR surface with environment lighting

Mount below Canvas. This small procedural environment avoids a remote preset dependency.

import { Environment, Lightformer } from '@react-three/drei'

Details

Repository
github.com/enzed/r3f-skills
Categories
3D, CAD & Modeling, Frontend & UI Code
First seen
May 16, 2026

More from enzed/r3f-skills

All 11

Similar to R3f Materials

More 3D, CAD & Modeling