Fixing access to nonuniform elements + SBT alignment

This commit is contained in:
mklefrancois 2020-05-27 14:43:05 +02:00
parent 4f46136c08
commit ccdc90f35c
41 changed files with 388 additions and 279 deletions

View file

@ -72,8 +72,8 @@ void main()
}
// Material of the object
int matIdx = matIndex[gl_InstanceID].i[gl_PrimitiveID];
WaveFrontMaterial mat = materials[gl_InstanceID].m[matIdx];
int matIdx = matIndex[nonuniformEXT(gl_InstanceID)].i[gl_PrimitiveID];
WaveFrontMaterial mat = materials[nonuniformEXT(gl_InstanceID)].m[matIdx];
// Diffuse
vec3 diffuse = computeDiffuse(mat, L, normal);