adding this line to the uniforms section of the shader json causes my custom shader to fail to parse:
{ "name": "NormalMat", "type": "matrix3x3", "count": 9, "values": [ 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 ]}
This is caused because the size of the array used to set the uniform has a minimum size of 16:
[media]This float array is then passed into Uniform#set(float[] values), which assumes that the array is the right size for the FloatBuffer used to store the values.
[media]This can be fixed by either changing the default size of the array, or limiting the number of copied values into the buffer. The simplest change is to change line 255 in the image above to the following:
floatBuffer.put(src, 0, count);
Attachments
Comments 4
Thank you for your report!
After consideration, the issue is being closed as Invalid.
This report does not describe a bug.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Can confirm on 1.17