Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::GpuPbrMaterial Struct Reference

GPU-side layout for PBR material with spherical harmonics Used by MovableDiffuseShader, L0/L1/L2 shaders, and DynamicTextures. More...

#include <RenderData.h>

Public Attributes

uint32_t baseColorTextureIndex
uint32_t normalTextureIndex
uint32_t roughnessMetallicTextureIndex
uint32_t emissiveTextureIndex
glm::vec4 baseColorFactor
glm::vec3 emissiveFactor
float roughnessFactor
float metallicFactor
float normalScale
float sh_scale
float ambient_term
uint32_t debug_mode
uint32_t tone_mapping
uint32_t lightmapTextureIndex
uint32_t hasLightmap

Detailed Description

GPU-side layout for PBR material with spherical harmonics Used by MovableDiffuseShader, L0/L1/L2 shaders, and DynamicTextures.

Layout (std430 compatible):

  • offset 0: 4x uint (texture indices) = 16 bytes
  • offset 16: vec4 baseColorFactor = 16 bytes
  • offset 32: vec3 emissiveFactor = 12 bytes (16-byte aligned due to std430 vec3 rules)
  • offset 44: 5x float = 20 bytes
  • offset 64: 2x uint + 2x uint padding = 16 bytes Total: 80 bytes
Date
2026-01-21

Definition at line 391 of file RenderData.h.

Member Data Documentation

◆ ambient_term

float EngineCore::GpuPbrMaterial::ambient_term

◆ baseColorFactor

glm::vec4 EngineCore::GpuPbrMaterial::baseColorFactor

◆ baseColorTextureIndex

uint32_t EngineCore::GpuPbrMaterial::baseColorTextureIndex

◆ debug_mode

uint32_t EngineCore::GpuPbrMaterial::debug_mode

◆ emissiveFactor

glm::vec3 EngineCore::GpuPbrMaterial::emissiveFactor

◆ emissiveTextureIndex

uint32_t EngineCore::GpuPbrMaterial::emissiveTextureIndex

◆ hasLightmap

uint32_t EngineCore::GpuPbrMaterial::hasLightmap

◆ lightmapTextureIndex

uint32_t EngineCore::GpuPbrMaterial::lightmapTextureIndex

◆ metallicFactor

float EngineCore::GpuPbrMaterial::metallicFactor

◆ normalScale

float EngineCore::GpuPbrMaterial::normalScale

◆ normalTextureIndex

uint32_t EngineCore::GpuPbrMaterial::normalTextureIndex

◆ roughnessFactor

float EngineCore::GpuPbrMaterial::roughnessFactor

◆ roughnessMetallicTextureIndex

uint32_t EngineCore::GpuPbrMaterial::roughnessMetallicTextureIndex

◆ sh_scale

float EngineCore::GpuPbrMaterial::sh_scale

◆ tone_mapping

uint32_t EngineCore::GpuPbrMaterial::tone_mapping

The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Renderer/RenderData.h