12#include <Metal/Metal.hpp>
52 const Vector3& cameraPosition,
bool enableNormalMaps,
float exposure,
58 const Vector3& skyDomeCenter,
bool isDome,
Texture* skyboxCubeMap);
66 if (width > 0.0f && height > 0.0f) {
76 float fadeR,
float fadeG,
float fadeB)
92 _lightingUniforms.reflectionDepthParams[1] = (heightRange > 0.001f) ? heightRange : 0.001f;
99 const float* cellsCountByBoundsSize,
100 int cellsX,
int cellsY,
int cellsZ,
int maxLightsPerCell,
101 int numClusteredLights)
136 const void* uniformData,
148 return !_materialBoundThisPass || mat != _lastBoundMaterial;
162 Texture* _envAtlasTexture =
nullptr;
163 Texture* _skyboxCubeMapTexture =
nullptr;
164 Texture* _shadowTexture =
nullptr;
165 Texture* _localShadowTexture0 =
nullptr;
166 Texture* _localShadowTexture1 =
nullptr;
167 Texture* _omniShadowCube0 =
nullptr;
168 Texture* _omniShadowCube1 =
nullptr;
171 bool _sceneDataBoundThisPass =
false;
172 simd::float4x4 _cachedSceneVP{};
175 bool _lightingBoundThisPass =
false;
176 uint32_t _lastLightingHash = 0;
177 size_t _lastLightingOffset = 0;
180 bool _materialBoundThisPass =
false;
181 const Material* _lastBoundMaterial =
nullptr;
182 size_t _lastMaterialOffset = 0;
Base class for GPU materials — owns uniform data, texture bindings, blend/depth state,...
GPU texture resource supporting 2D, cubemap, volume, and array formats with mipmap management.
RGBA color with floating-point components in [0, 1].
Per-light GPU data uploaded to the lighting uniform buffer.
4x4 column-major transformation matrix with SIMD acceleration.
3D vector for positions, directions, and normals with multi-backend SIMD acceleration.