-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi Mark,
I'm attempting to shove a bunch of palette values from Monkey2 side into a uniform array, but as far as I can tell, that's not currently possible as we don't have the relevant SetXXXArray option. (Did consider abusing SetMat4fArray, but... )
Naive attempt with floats! Would be looking to fill in vec3s or maybe just floats (hsl hue values) in my case...
' OK, this wasn't gonna happen!
TargetImage.Material.SetFloat ("m_Test[0]", 0.0)
TargetImage.Material.SetFloat ("m_Test[1]", 1.0)
' GLSL side:
uniform float m_Test [2];
if (m_Test[1] > 0.0)
' Nope!
I'm avoiding sending the palette texture as I would need to do up to 8, 16... maybe even 256 texture lookups per-pixel for closest-colour selection, depending on fake retro-palette, and one thing I've learned is that this is slow, whereas a quick iteration through float or vec3 arrays ought to be fine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels