Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
DefaultPipeline::Resource::TransformGPUData Struct Reference

GPU buffer structure for model transform data. More...

#include <TransformGPUBuffer.hpp>

Public Attributes

glm::mat4 modelMatrix
glm::mat4 normalMatrix

Detailed Description

GPU buffer structure for model transform data.

Contains the model matrix and normal matrix for proper vertex/normal transformations. The normal matrix (inverse transpose of the upper-left 3x3 of modelMatrix) is required for correct normal transformation when the model has non-uniform scaling.

Layout (WGSL std140 alignment):

  • modelMatrix: mat4x4<f32> (64 bytes, offset 0)
  • normalMatrix: mat4x4<f32> (64 bytes, offset 64) Total: 128 bytes

Member Data Documentation

◆ modelMatrix

glm::mat4 DefaultPipeline::Resource::TransformGPUData::modelMatrix

◆ normalMatrix

glm::mat4 DefaultPipeline::Resource::TransformGPUData::normalMatrix

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