umlaeute / Gem

Graphics Environment for Multimedia (official repository)
https://gem.iem.at
Other
98 stars 28 forks source link

uniform arrays on macOS #386

Closed umlaeute closed 6 months ago

umlaeute commented 7 months ago

consider a fragment shader

#version 120
uniform float col[4];

void main() {
 gl_FragColor = vec4(col[0], col[1], col[2], col[3]);
}

this works nicely on my Linux system (OpenGL 4.6.0 NVIDIA 525.125.06), as in: i can send a [col 1 1 1 1( message to color all fragments white, and [col 0 1 0 1( to color them green. However, on macOS (Monterey M1), regardless of what i send, only the first element of the array is acknowledged (so i can toggle between a black and a redish fragment).

This was first reported by @Helli1995

Here's a stackexchange question that might be related: https://gamedev.stackexchange.com/questions/95265

umlaeute commented 6 months ago

Fixed with 10dc162fef99fd7a50a9f7c398a956884374d9cf