crash bugfix

This commit is contained in:
devZoGok
2026-07-08 20:04:17 +03:00
parent f457c69d36
commit 9418b0b4f4
3 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ layout(std430, binding = 0) readonly restrict buffer objSSBO {
GuiObjectData guiObjData[];
};
uniform sampler2DArray textureSamplers[256];
uniform sampler2DArray textureSamplers[128];
void main(){
int id = ID;
+1 -1
View File
@@ -42,7 +42,7 @@ layout(std430, binding = 2) readonly buffer lightsSSBO {
const int numLights = 0;
uniform vec3 camPos;
uniform sampler2DArray textureSamplers[256];
uniform sampler2DArray textureSamplers[128];
float linDepth(float depth, int i){
float z = depth * 2 - 1, near = lights[i].near, far = lights[i].far;
+1 -6
View File
@@ -685,8 +685,6 @@ namespace vb01{
return proj * view;
}
//TODO replace sorting algorithm
//TODO specify differentiation of nodes with translucent meshes AND texts
void Root::updateNodeTree(Shader *shader, bool gui){
shader->use();
@@ -695,9 +693,6 @@ namespace vb01{
objFragData.clear();
drawCmds.clear();
for(DrawElementsIndirectCommand &cmd : drawCmds)
cmd.instanceCount = 0;
Vector3 camPos = camera->getPosition();
shader->setVec3(camPos, "camPos");
projView = calculateProjView(camPos);
@@ -707,7 +702,7 @@ namespace vb01{
shader->setVec2(Vector2(width, height), "screen");
}
for(int i = 0; i < currTextureDims.size(); i++)
for(int i = 0; i < NUM_MAX_TEXTURE_UNITS; i++)
shader->setInt(i, "textureSamplers[" + to_string(i) + "]");
}