Path Tracing
Loading...
Searching...
No Matches
GPUMaterial Struct Reference

#include <mesh.hpp>

Public Attributes

vec4 albedo
vec4 emission
int type
 Material type.
float ior
int tex_index
 -1 = no albedo texture
int normal_tex_index
 -1 = no normal map
float roughness
 0 = smooth like mirror, 1 = full rough
float metallic
 0 = dielectric, 1 = metal
glm::vec4 albedo
glm::vec4 emission
glm::vec2 _pad

Detailed Description

Note
vec4, alpha value used only as padding for std430

Member Data Documentation

◆ _pad

glm::vec2 GPUMaterial::_pad

◆ albedo [1/2]

vec4 GPUMaterial::albedo

◆ albedo [2/2]

glm::vec4 GPUMaterial::albedo

◆ emission [1/2]

vec4 GPUMaterial::emission

◆ emission [2/2]

glm::vec4 GPUMaterial::emission

◆ ior

float GPUMaterial::ior

◆ metallic

float GPUMaterial::metallic

0 = dielectric, 1 = metal

◆ normal_tex_index

int GPUMaterial::normal_tex_index

-1 = no normal map

◆ roughness

float GPUMaterial::roughness

0 = smooth like mirror, 1 = full rough

◆ tex_index

int GPUMaterial::tex_index

-1 = no albedo texture

◆ type

int GPUMaterial::type

Material type.

Todo
Add uv_scale implementation to reduce texture unused size (here and globals), remove _pad

The documentation for this struct was generated from the following files: