Tengo este código en mi vertex shader:
in vec3 geometry; in vec4 offset; // xyz - offset, w sizeFactor in vec4 rotationQuad; in vec2 textureCoord; in vec2 textureNr; in highp float faceNumber; in vec4 lightMatrix1; in vec4 lightMatrix2; in vec4 lightMatrix3; in vec4 lightMatrix4; in vec4 lightMatrix5; in vec4 lightMatrix6;Los dos últimos atributos "lightMatrix5" y "lightMatrix6" no funcionan en Chrome en Windows. En Firefox todo funciona bien también en Chrome con Ubuntu Linux.
Cuando cambio el orden de los atributos, los dos últimos definidos dejan de funcionar. P.ej:
in vec4 lightMatrix1; in vec4 lightMatrix2; in vec4 lightMatrix5; in vec4 lightMatrix6; in vec4 lightMatrix3; in vec4 lightMatrix4;Ahora "lightMatrix3" y "lightMatrix4" no funcionan, pero "lightMatrix5" y "lightMatrix6" funcionan bien ahora.
Los parámetros de WebGL se ven así:
WebGLInfo::: WebGL 2 supported WebGLInfo::: Max Vertex Attributes 16 WebGLInfo::: Max Varying Vectors 32 WebGLInfo::: Max Vertex Uniform Vectors 1024 WebGLInfo::: Max Fragment Uniform Vectors 1024Los atributos posibles deberían ser 16, estoy usando 12 y el límite de costuras debe ser 10.
¿Alguna idea de por qué sucede y cómo solucionarlo?
¡Muchas gracias!
Reemplacé los 4 atributos vec4 (lightmatrix1-4) con un atributo mat4 y ahora funciona. Los atributos cuentan costuras a la materia.