PBR Material Shaders
PBR Material Shaders define surface appearance using physically-based rendering principles. These shaders can simulate materials ranging from simple diffuse surfaces to complex materials with clear coat, fabric sheen, and anisotropic reflections.
3dverse provides two variants of the default PBR material shader:
Opaque
PBR Opaque Uber Material
Transparent
PBR Transparent Uber Material
Material Features

Base
Albedo, roughness, metallic, emission.

Clear Coat
Secondary reflective layer.

Triplanar
Texture projection.

Parallax
Height-based displacement.

Sheen
Fabric rim lighting.

Anisotropy
Directional reflection.
Feature Constants
| Constant | Description | Use Case |
|---|---|---|
MATERIAL_TRANSPARENT | Transparency and refraction | Glass, water |
MATERIAL_CLEAR_COAT | Glossy coating layer | Car paint, varnished wood |
MATERIAL_SHEEN | Fabric rim highlights | Cloth, velvet, satin |
MATERIAL_ANISOTROPY | Directional reflections | Brushed metal, hair |
VERTEX_SKINNED | Skeletal animation | Animated characters |
MATERIAL_TRIPLANAR | Three-axis texture projection | Terrain, rocks without UVs |
MATERIAL_UNTEXTURED | No texture sampling | Solid colors |
MATERIAL_NO_DECALS | Prevent decal application | Special surfaces |
MATERIAL_PARALLAX | Height-based displacement | Brick walls, cobblestones |
Parameters
Base
Albedo
albedo
vec3
Base color of the material
albedoTexture
texture2d_ref
Texture map for base color
MATERIAL_UNTEXTURED
Reflectivity
metallic
float
Metallic appearance (0 = non-metallic/dielectric, 1 = metallic)
metallicTexture
texture2d_ref
Texture map for metallic property
MATERIAL_UNTEXTURED
roughness
float
Microscopic surface roughness (0 = smooth mirror, 1 = rough diffuse)
roughnessTexture
texture2d_ref
Texture map for surface roughness
MATERIAL_UNTEXTURED
Ambient Occlusion
ambientOcclusion
float
Intensity of ambient lighting on surface
ambientOcclusionTexture
texture2d_ref
Texture map for ambient occlusion
MATERIAL_UNTEXTURED
Emissive
emission
vec3
Light emitted by surface
emissionIntensity
float
Multiplier for emission brightness
emissionTexture
texture2d_ref
Texture map for emissive areas
MATERIAL_UNTEXTURED
Normals
flipNormalTextureBlueChannel
int32_t
Blue channel inversion for normal map format compatibility
MATERIAL_UNTEXTURED
flipNormalTextureGreenChannel
int32_t
Green channel inversion for normal map format compatibility
MATERIAL_UNTEXTURED
normalTexture
texture2d_ref
Normal map for surface detail and bump mapping
MATERIAL_UNTEXTURED
UVs
offset
vec2
UV texture offset for positioning
MATERIAL_UNTEXTURED
scale
vec2
UV texture tiling scale
MATERIAL_UNTEXTURED
Opacity
indexOfRefraction
float
Light refraction amount for transparent materials (1.5 for glass)
MATERIAL_TRANSPARENT
opacity
float
Opacity level for transparent materials
MATERIAL_TRANSPARENT
opacityTexture
texture2d_ref
Texture map for transparency
MATERIAL_TRANSPARENT
MATERIAL_UNTEXTURED
Clear Coat
clearCoatNormalTexture
texture2d_ref
Normal map for clear coat layer
MATERIAL_CLEAR_COAT
MATERIAL_UNTEXTURED
clearCoatRoughnessTexture
texture2d_ref
Roughness texture for clear coat layer
MATERIAL_CLEAR_COAT
MATERIAL_UNTEXTURED
clearCoatRoughness
float
Roughness of clear coat layer
MATERIAL_CLEAR_COAT
clearCoatNormalTexScale
float
Clear coat normal map tiling scale
MATERIAL_CLEAR_COAT
MATERIAL_UNTEXTURED
clearCoatStrength
float
Strength of coating layer effect
MATERIAL_CLEAR_COAT
Triplanar
sharpness
float
Transition hardness between projection axes
MATERIAL_TRIPLANAR
MATERIAL_UNTEXTURED
rotationDeg
vec3
Texture rotation angle for each projection axis
MATERIAL_TRIPLANAR
MATERIAL_UNTEXTURED
triplanarBlendMode
int32_t
Blending mode for combining triplanar projections
MATERIAL_TRIPLANAR
MATERIAL_UNTEXTURED
triplanarParallax
int32_t
Parallax mapping toggle for triplanar projection
MATERIAL_TRIPLANAR
MATERIAL_UNTEXTURED
triplanarUseLocalSpace
int32_t
Space mode for triplanar projection (world or local)
MATERIAL_TRIPLANAR
MATERIAL_UNTEXTURED
Parallax
heightMapScale
float
Depth scale for parallax displacement effect
MATERIAL_PARALLAX
MATERIAL_UNTEXTURED
heightMapTexture
texture2d_ref
Height map texture for parallax mapping
MATERIAL_PARALLAX
MATERIAL_UNTEXTURED
Sheen
sheenColor
vec3
Color of fabric-like sheen reflection
MATERIAL_SHEEN
sheenColorIntensity
float
Strength of sheen color effect
MATERIAL_SHEEN
sheenColorTexture
texture2d_ref
Texture map for sheen color
MATERIAL_SHEEN
MATERIAL_UNTEXTURED
sheenRoughness
float
Roughness of sheen reflection layer
MATERIAL_SHEEN
sheenRoughnessTexture
texture2d_ref
Texture map for sheen roughness
MATERIAL_SHEEN
Anisotropy
anisotropyStrength
float
Strength of directional reflection (for brushed metal)
MATERIAL_ANISOTROPY
anisotropyRotation
float
Rotation angle of anisotropic highlight direction
MATERIAL_ANISOTROPY
anisotropyTexture
texture2d_ref
Texture map for anisotropic properties
MATERIAL_ANISOTROPY
MATERIAL_UNTEXTURED
Textures
- Texture samples are multiplied by their corresponding parameters (final value = parameter × texture sample)
- AO (red), roughness (green), metallic (blue) can be packed in a single RGB texture