use of me.mcblueparrot.client.util.access.AccessShaderGroup in project Client by Sol-Client.
the class ColourSaturationMod method update.
public void update() {
if (group == null) {
groupSaturation = saturation;
try {
group = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), RESOURCE_LOCATION);
group.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
} catch (JsonSyntaxException | IOException error) {
logger.error("Could not load saturation shader", error);
}
}
if (groupSaturation != saturation) {
((AccessShaderGroup) group).getListShaders().forEach((shader) -> {
ShaderUniform saturationUniform = shader.getShaderManager().getShaderUniform("Saturation");
if (saturationUniform != null) {
saturationUniform.set(saturation);
}
});
groupSaturation = saturation;
}
}
use of me.mcblueparrot.client.util.access.AccessShaderGroup in project Client by Sol-Client.
the class MenuBlurMod method update.
public void update() {
if (group == null) {
try {
group = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), RESOURCE_LOCATION);
group.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
} catch (JsonSyntaxException | IOException error) {
logger.error("Could not load menu blur", error);
}
}
((AccessShaderGroup) group).getListShaders().forEach((shader) -> {
ShaderUniform radius = shader.getShaderManager().getShaderUniform("Radius");
ShaderUniform progress = shader.getShaderManager().getShaderUniform("Progress");
if (radius != null) {
radius.set(blur);
}
if (progress != null) {
if (fadeTime > 0) {
progress.set(getProgress());
} else {
progress.set(1);
}
}
});
}
use of me.mcblueparrot.client.util.access.AccessShaderGroup in project Client by Sol-Client.
the class MotionBlurMod method update.
public void update() {
if (group == null) {
groupBlur = blur;
try {
group = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), RESOURCE_LOCATION);
group.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
} catch (JsonSyntaxException | IOException error) {
logger.error("Could not load motion blur", error);
}
}
if (groupBlur != blur) {
((AccessShaderGroup) group).getListShaders().forEach((shader) -> {
ShaderUniform blendFactor = shader.getShaderManager().getShaderUniform("BlendFactor");
if (blendFactor != null) {
blendFactor.set(blur);
}
});
groupBlur = blur;
}
}
Aggregations