Search in sources :

Example 1 with PostProcessingEvent

use of me.mcblueparrot.client.event.impl.PostProcessingEvent in project sol-client-glassmc by danterusdev.

the class MixinEntityRenderer method addShaders.

@Inject(method = "updateCameraAndRender(FJ)V", at = @At(value = "INVOKE", target = "Lv1_8_9/net/minecraft/client/shader" + "/Framebuffer;bindFramebuffer(Z)V", shift = At.Shift.BEFORE))
public void addShaders(float partialTicks, long nanoTime, CallbackInfo callback) {
    for (ShaderGroup group : Client.INSTANCE.bus.post(new PostProcessingEvent(PostProcessingEvent.Type.RENDER)).groups) {
        GlStateManager.matrixMode(5890);
        GlStateManager.pushMatrix();
        GlStateManager.loadIdentity();
        group.loadShaderGroup(((AccessMinecraft) Minecraft.getMinecraft()).getTimerSC().renderPartialTicks);
        GlStateManager.popMatrix();
    }
}
Also used : ShaderGroup(v1_8_9.net.minecraft.client.shader.ShaderGroup) PostProcessingEvent(me.mcblueparrot.client.event.impl.PostProcessingEvent) AccessMinecraft(me.mcblueparrot.client.mixin.client.access.AccessMinecraft) Inject(org.spongepowered.asm.mixin.injection.Inject)

Example 2 with PostProcessingEvent

use of me.mcblueparrot.client.event.impl.PostProcessingEvent in project Client by Sol-Client.

the class MixinEntityRenderer method addShaders.

@Inject(method = "updateCameraAndRender", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/shader" + "/Framebuffer;bindFramebuffer(Z)V", shift = At.Shift.BEFORE))
public void addShaders(float partialTicks, long nanoTime, CallbackInfo callback) {
    for (ShaderGroup group : Client.INSTANCE.bus.post(new PostProcessingEvent(PostProcessingEvent.Type.RENDER)).groups) {
        GlStateManager.matrixMode(5890);
        GlStateManager.pushMatrix();
        GlStateManager.loadIdentity();
        group.loadShaderGroup(AccessMinecraft.getInstance().getTimerSC().renderPartialTicks);
        GlStateManager.popMatrix();
    }
}
Also used : ShaderGroup(net.minecraft.client.shader.ShaderGroup) PostProcessingEvent(me.mcblueparrot.client.event.impl.PostProcessingEvent) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

PostProcessingEvent (me.mcblueparrot.client.event.impl.PostProcessingEvent)2 Inject (org.spongepowered.asm.mixin.injection.Inject)2 AccessMinecraft (me.mcblueparrot.client.mixin.client.access.AccessMinecraft)1 ShaderGroup (net.minecraft.client.shader.ShaderGroup)1 ShaderGroup (v1_8_9.net.minecraft.client.shader.ShaderGroup)1