mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
crash bugfix
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
@@ -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) + "]");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user