use of net.minecraft.client.shader.ShaderUniform 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 net.minecraft.client.shader.ShaderUniform 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 net.minecraft.client.shader.ShaderUniform in project sol-client-glassmc by danterusdev.
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 net.minecraft.client.shader.ShaderUniform in project sol-client-glassmc by danterusdev.
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 net.minecraft.client.shader.ShaderUniform in project cosmos by momentumdevelopment.
the class ESPModule method onUpdate.
@Override
public void onUpdate() {
if (mode.getValue().equals(Mode.GLOW)) {
// set all entities in the world glowing
mc.world.loadedEntityList.forEach(entity -> {
if (entity != null && !entity.equals(mc.player) && hasHighlight(entity)) {
entity.setGlowing(true);
}
});
// get the shaders
ShaderGroup outlineShaderGroup = ((IRenderGlobal) mc.renderGlobal).getEntityOutlineShader();
List<Shader> shaders = ((IShaderGroup) outlineShaderGroup).getListShaders();
// update the shader radius
shaders.forEach(shader -> {
ShaderUniform outlineRadius = shader.getShaderManager().getShaderUniform("Radius");
if (outlineRadius != null) {
outlineRadius.set(width.getValue().floatValue());
}
});
}
}
Aggregations