I'm having trouble finding a way to access uniforms in the shader programs.
What I'm trying to do is when there is an active post-effect I need a way to access the program's uniforms with codes in order to make changes in real-time.
public static void activeShader(ResourceLocation shader) {
var renderer = Minecraft.getInstance().gameRenderer;
renderer.loadEffect(shader);
}
"shaders/program/testing.json"
{
"blend": {
"func": "add",
"srcrgb": "one",
"dstrgb": "zero"
},
"vertex": "sobel",
"fragment": "darklight:testing",
"attributes": [ "Position" ],
"samplers": [
{ "name": "DiffuseSampler" },
{ "name": "PrevSampler" }
],
"uniforms": [
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
{ "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] },
{ "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] },
{ "name": "VoidSize", "type": "float", "count": 1, "values": [ 1.0 ] }
]
}