Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.cspell/gamedev_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ bitfield # data structure consisting of adjacent bits
broadphase # common division of collision detection between broad and narrow phases
cathetus # the non-hypotenuse sides of a right triangle
clusterized # past tense of clusterize
gles # OpenGL for Embedded Systems
glsl # OpenGL Shading Language
gltf # OpenGL Transmission Format, a file format for 3D models
goldens # test files used as reference for Golden Tests
Expand Down
Binary file modified packages/flame_3d/assets/shaders/spatial_material.shaderbundle
Binary file not shown.
4 changes: 3 additions & 1 deletion packages/flame_3d/lib/src/resources/light/lighting_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class LightingInfo {
throw Exception('At most 3 point lights are allowed');
}

shader.setUint('LightsInfo.numLights', numLights);
// NOTE: using floats because Android GLES does not support integer uniforms
// Refer to https://github.com/flutter/engine/pull/55329
shader.setFloat('LightsInfo.numLights', numLights.toDouble());
for (final (index, light) in pointLights.indexed) {
light.apply(index, shader);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/flame_3d/shaders/spatial_material.frag
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ uniform AmbientLight {
} ambientLight;

uniform LightsInfo {
uint numLights;
float numLights;
} lightsInfo;

// uniform Light {
Expand Down