Java 类net.minecraft.client.shader.ShaderGroup 实例源码

项目:DecompiledMinecraft    文件:EntityRenderer.java   
private void loadShader(ResourceLocation resourceLocationIn)
{
    try
    {
        this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), resourceLocationIn);
        this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
        this.useShader = true;
    }
    catch (IOException ioexception)
    {
        logger.warn((String)("Failed to load shader: " + resourceLocationIn), (Throwable)ioexception);
        this.shaderIndex = shaderCount;
        this.useShader = false;
    }
    catch (JsonSyntaxException jsonsyntaxexception)
    {
        logger.warn((String)("Failed to load shader: " + resourceLocationIn), (Throwable)jsonsyntaxexception);
        this.shaderIndex = shaderCount;
        this.useShader = false;
    }
}
项目:BaseClient    文件:EntityRenderer.java   
public void loadShader(ResourceLocation resourceLocationIn)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        try
        {
            this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), resourceLocationIn);
            this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.useShader = true;
        }
        catch (IOException ioexception)
        {
            logger.warn((String)("Failed to load shader: " + resourceLocationIn), (Throwable)ioexception);
            this.shaderIndex = shaderCount;
            this.useShader = false;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            logger.warn((String)("Failed to load shader: " + resourceLocationIn), (Throwable)jsonsyntaxexception);
            this.shaderIndex = shaderCount;
            this.useShader = false;
        }
    }
}
项目:BaseClient    文件:EntityRenderer.java   
private void loadShader(ResourceLocation resourceLocationIn) {
    try {
        this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager,
                this.mc.getFramebuffer(), resourceLocationIn);
        this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
        this.useShader = true;
    } catch (IOException ioexception) {
        logger.warn((String) ("Failed to load shader: " + resourceLocationIn), (Throwable) ioexception);
        this.shaderIndex = shaderCount;
        this.useShader = false;
    } catch (JsonSyntaxException jsonsyntaxexception) {
        logger.warn((String) ("Failed to load shader: " + resourceLocationIn), (Throwable) jsonsyntaxexception);
        this.shaderIndex = shaderCount;
        this.useShader = false;
    }
}
项目:Backmemed    文件:EntityRenderer.java   
public void loadShader(ResourceLocation resourceLocationIn)
{
    if (OpenGlHelper.isFramebufferEnabled())
    {
        try
        {
            this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), resourceLocationIn);
            this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.useShader = true;
        }
        catch (IOException ioexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourceLocationIn, ioexception});
            this.shaderIndex = SHADER_COUNT;
            this.useShader = false;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourceLocationIn, jsonsyntaxexception});
            this.shaderIndex = SHADER_COUNT;
            this.useShader = false;
        }
    }
}
项目:CustomWorldGen    文件:EntityRenderer.java   
public void loadShader(ResourceLocation resourceLocationIn)
{
    try
    {
        this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), resourceLocationIn);
        this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
        this.useShader = true;
    }
    catch (IOException ioexception)
    {
        LOGGER.warn("Failed to load shader: {}", new Object[] {resourceLocationIn, ioexception});
        this.shaderIndex = SHADER_COUNT;
        this.useShader = false;
    }
    catch (JsonSyntaxException jsonsyntaxexception)
    {
        LOGGER.warn("Failed to load shader: {}", new Object[] {resourceLocationIn, jsonsyntaxexception});
        this.shaderIndex = SHADER_COUNT;
        this.useShader = false;
    }
}
项目:ShadyMod    文件:ShadyMod.java   
public void activateBatch()
{
    if(batch != null)
    {
        if(OpenGlHelper.shadersSupported)
        {
            try
            {
                ShaderGroup theShaderGroup = batch.toShaderGroup(resManager);
                theShaderGroup.createBindFramebuffers(Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);
                ObfuscationReflectionHelper.setPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, theShaderGroup, 51);
                ObfuscationReflectionHelper.setPrivateValue(EntityRenderer.class, Minecraft.getMinecraft().entityRenderer, true, 55);
            }
            catch(JsonException e)
            {
                e.printStackTrace();
            }
        }
    }
}
项目:Resilience-Client-Source    文件:EntityRenderer.java   
public void onResourceManagerReload(IResourceManager par1ResourceManager)
{
    if (this.theShaderGroup != null)
    {
        this.theShaderGroup.deleteShaderGroup();
    }

    if (this.shaderIndex != shaderCount)
    {
        try
        {
            this.theShaderGroup = new ShaderGroup(par1ResourceManager, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
            this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
        }
        catch (IOException var3)
        {
            logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], var3);
            this.shaderIndex = shaderCount;
        }
    }
}
项目:ExpandedRailsMod    文件:EntityRenderer.java   
public void loadShader(ResourceLocation resourceLocationIn)
{
    try
    {
        this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), resourceLocationIn);
        this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
        this.useShader = true;
    }
    catch (IOException ioexception)
    {
        LOGGER.warn("Failed to load shader: {}", new Object[] {resourceLocationIn, ioexception});
        this.shaderIndex = SHADER_COUNT;
        this.useShader = false;
    }
    catch (JsonSyntaxException jsonsyntaxexception)
    {
        LOGGER.warn("Failed to load shader: {}", new Object[] {resourceLocationIn, jsonsyntaxexception});
        this.shaderIndex = SHADER_COUNT;
        this.useShader = false;
    }
}
项目:Corruption    文件:ClientProxy.java   
@Override
public void enableGrayscaleShader() {
    if (OpenGlHelper.shadersSupported) {
        Minecraft mc = Minecraft.getMinecraft();
        EntityRenderer entityRenderer = mc.entityRenderer;
        if (entityRenderer.theShaderGroup != null) {
            entityRenderer.theShaderGroup.deleteShaderGroup();
        }

        try {
            entityRenderer.theShaderGroup = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), this.shader);
            entityRenderer.theShaderGroup.createBindFramebuffers(mc.displayWidth, mc.displayHeight);
        } catch (IOException ioexception) {
            Corruption.logger.warn("Failed to load shader: ", ioexception);
        }
    }
}
项目:Cauldron    文件:EntityRenderer.java   
public void onResourceManagerReload(IResourceManager p_110549_1_)
{
    if (this.theShaderGroup != null)
    {
        this.theShaderGroup.deleteShaderGroup();
    }

    if (this.shaderIndex != shaderCount)
    {
        try
        {
            this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), p_110549_1_, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
            this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
        }
        catch (IOException ioexception)
        {
            logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], ioexception);
            this.shaderIndex = shaderCount;
        }
    }
}
项目:Cauldron    文件:EntityRenderer.java   
public void onResourceManagerReload(IResourceManager p_110549_1_)
{
    if (this.theShaderGroup != null)
    {
        this.theShaderGroup.deleteShaderGroup();
    }

    if (this.shaderIndex != shaderCount)
    {
        try
        {
            this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), p_110549_1_, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
            this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
        }
        catch (IOException ioexception)
        {
            logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], ioexception);
            this.shaderIndex = shaderCount;
        }
    }
}
项目:RefinedRelocation    文件:KongaHandler.java   
private static void activateKongaShader()
{
    EntityRenderer renderer = Minecraft.getMinecraft().entityRenderer;
    if (OpenGlHelper.shadersSupported)
    {
        if (renderer.theShaderGroup != null)
        {
            renderer.theShaderGroup.deleteShaderGroup();
        }

        try
        {
            LogHelper.info("Selecting effect " + shader);
            renderer.theShaderGroup = new ShaderGroup(Minecraft.getMinecraft().getTextureManager(), Minecraft.getMinecraft().getResourceManager(), Minecraft.getMinecraft().getFramebuffer(), shader);
            renderer.theShaderGroup.createBindFramebuffers(Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);
        } catch (Exception e)
        {
            e.printStackTrace();
            LogHelper.warning("Failed to load shader: " + shader);
        }
    }
}
项目:DecompiledMinecraft    文件:RenderGlobal.java   
/**
 * Creates the entity outline shader to be stored in RenderGlobal.entityOutlineShader
 */
public void makeEntityOutlineShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (ShaderLinkHelper.getStaticShaderLinkHelper() == null)
        {
            ShaderLinkHelper.setNewStaticShaderLinkHelper();
        }

        ResourceLocation resourcelocation = new ResourceLocation("shaders/post/entity_outline.json");

        try
        {
            this.entityOutlineShader = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocation);
            this.entityOutlineShader.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.entityOutlineFramebuffer = this.entityOutlineShader.getFramebufferRaw("final");
        }
        catch (IOException ioexception)
        {
            logger.warn((String)("Failed to load shader: " + resourcelocation), (Throwable)ioexception);
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            logger.warn((String)("Failed to load shader: " + resourcelocation), (Throwable)jsonsyntaxexception);
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
    }
    else
    {
        this.entityOutlineShader = null;
        this.entityOutlineFramebuffer = null;
    }
}
项目:BaseClient    文件:RenderGlobal.java   
/**
 * Creates the entity outline shader to be stored in RenderGlobal.entityOutlineShader
 */
public void makeEntityOutlineShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (ShaderLinkHelper.getStaticShaderLinkHelper() == null)
        {
            ShaderLinkHelper.setNewStaticShaderLinkHelper();
        }

        ResourceLocation resourcelocation = new ResourceLocation("shaders/post/entity_outline.json");

        try
        {
            this.entityOutlineShader = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocation);
            this.entityOutlineShader.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.entityOutlineFramebuffer = this.entityOutlineShader.getFramebufferRaw("final");
        }
        catch (IOException ioexception)
        {
            logger.warn((String)("Failed to load shader: " + resourcelocation), (Throwable)ioexception);
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            logger.warn((String)("Failed to load shader: " + resourcelocation), (Throwable)jsonsyntaxexception);
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
    }
    else
    {
        this.entityOutlineShader = null;
        this.entityOutlineFramebuffer = null;
    }
}
项目:BaseClient    文件:RenderGlobal.java   
/**
 * Creates the entity outline shader to be stored in RenderGlobal.entityOutlineShader
 */
public void makeEntityOutlineShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (ShaderLinkHelper.getStaticShaderLinkHelper() == null)
        {
            ShaderLinkHelper.setNewStaticShaderLinkHelper();
        }

        ResourceLocation resourcelocation = new ResourceLocation("shaders/post/entity_outline.json");

        try
        {
            this.entityOutlineShader = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocation);
            this.entityOutlineShader.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.entityOutlineFramebuffer = this.entityOutlineShader.getFramebufferRaw("final");
        }
        catch (IOException ioexception)
        {
            logger.warn((String)("Failed to load shader: " + resourcelocation), (Throwable)ioexception);
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            logger.warn((String)("Failed to load shader: " + resourcelocation), (Throwable)jsonsyntaxexception);
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
    }
    else
    {
        this.entityOutlineShader = null;
        this.entityOutlineFramebuffer = null;
    }
}
项目:Backmemed    文件:RenderGlobal.java   
/**
 * Creates the entity outline shader to be stored in RenderGlobal.entityOutlineShader
 */
public void makeEntityOutlineShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (ShaderLinkHelper.getStaticShaderLinkHelper() == null)
        {
            ShaderLinkHelper.setNewStaticShaderLinkHelper();
        }

        ResourceLocation resourcelocation = new ResourceLocation("shaders/post/entity_outline.json");

        try
        {
            this.entityOutlineShader = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocation);
            this.entityOutlineShader.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.entityOutlineFramebuffer = this.entityOutlineShader.getFramebufferRaw("final");
        }
        catch (IOException ioexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourcelocation, ioexception});
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourcelocation, jsonsyntaxexception});
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
    }
    else
    {
        this.entityOutlineShader = null;
        this.entityOutlineFramebuffer = null;
    }
}
项目:CustomWorldGen    文件:RenderGlobal.java   
/**
 * Creates the entity outline shader to be stored in RenderGlobal.entityOutlineShader
 */
public void makeEntityOutlineShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (ShaderLinkHelper.getStaticShaderLinkHelper() == null)
        {
            ShaderLinkHelper.setNewStaticShaderLinkHelper();
        }

        ResourceLocation resourcelocation = new ResourceLocation("shaders/post/entity_outline.json");

        try
        {
            this.entityOutlineShader = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocation);
            this.entityOutlineShader.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.entityOutlineFramebuffer = this.entityOutlineShader.getFramebufferRaw("final");
        }
        catch (IOException ioexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourcelocation, ioexception});
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourcelocation, jsonsyntaxexception});
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
    }
    else
    {
        this.entityOutlineShader = null;
        this.entityOutlineFramebuffer = null;
    }
}
项目:4Space-5    文件:EntityRenderer.java   
public void activateNextShader() throws IOException
{
    if (OpenGlHelper.shadersSupported)
    {
        if (this.theShaderGroup != null) {
            this.theShaderGroup.deleteShaderGroup();
        }
        this.shaderIndex = ((this.shaderIndex + 1) % (shaderResourceLocations.length + 1));
        if (this.shaderIndex != shaderCount)
        {
            try
            {
                logger.info("Selecting effect " + shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            }
            catch (JsonSyntaxException jsonsyntaxexception)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], jsonsyntaxexception);
                this.shaderIndex = shaderCount;
            }
        }
        else
        {
            this.theShaderGroup = null;
            logger.info("No effect selected");
        }
    }
}
项目:Resilience-Client-Source    文件:EntityRenderer.java   
public void activateNextShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (this.theShaderGroup != null)
        {
            this.theShaderGroup.deleteShaderGroup();
        }

        this.shaderIndex = (this.shaderIndex + 1) % (shaderResourceLocations.length + 1);

        if (this.shaderIndex != shaderCount)
        {
            try
            {
                logger.info("Selecting effect " + shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup = new ShaderGroup(this.resourceManager, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            }
            catch (IOException var2)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], var2);
                this.shaderIndex = shaderCount;
            }
            catch (JsonSyntaxException var3)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], var3);
                this.shaderIndex = shaderCount;
            }
        }
        else
        {
            this.theShaderGroup = null;
            logger.info("No effect selected");
        }
    }
}
项目:4Space-1.7    文件:EntityRenderer.java   
public void activateNextShader() throws IOException
{
    if (OpenGlHelper.shadersSupported)
    {
        if (this.theShaderGroup != null) {
            this.theShaderGroup.deleteShaderGroup();
        }
        this.shaderIndex = ((this.shaderIndex + 1) % (shaderResourceLocations.length + 1));
        if (this.shaderIndex != shaderCount)
        {
            try
            {
                logger.info("Selecting effect " + shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            }
            catch (JsonSyntaxException jsonsyntaxexception)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], jsonsyntaxexception);
                this.shaderIndex = shaderCount;
            }
        }
        else
        {
            this.theShaderGroup = null;
            logger.info("No effect selected");
        }
    }
}
项目:ExpandedRailsMod    文件:RenderGlobal.java   
/**
 * Creates the entity outline shader to be stored in RenderGlobal.entityOutlineShader
 */
public void makeEntityOutlineShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (ShaderLinkHelper.getStaticShaderLinkHelper() == null)
        {
            ShaderLinkHelper.setNewStaticShaderLinkHelper();
        }

        ResourceLocation resourcelocation = new ResourceLocation("shaders/post/entity_outline.json");

        try
        {
            this.entityOutlineShader = new ShaderGroup(this.mc.getTextureManager(), this.mc.getResourceManager(), this.mc.getFramebuffer(), resourcelocation);
            this.entityOutlineShader.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            this.entityOutlineFramebuffer = this.entityOutlineShader.getFramebufferRaw("final");
        }
        catch (IOException ioexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourcelocation, ioexception});
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
        catch (JsonSyntaxException jsonsyntaxexception)
        {
            LOGGER.warn("Failed to load shader: {}", new Object[] {resourcelocation, jsonsyntaxexception});
            this.entityOutlineShader = null;
            this.entityOutlineFramebuffer = null;
        }
    }
    else
    {
        this.entityOutlineShader = null;
        this.entityOutlineFramebuffer = null;
    }
}
项目:Cauldron    文件:EntityRenderer.java   
public void activateNextShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (this.theShaderGroup != null)
        {
            this.theShaderGroup.deleteShaderGroup();
        }

        this.shaderIndex = (this.shaderIndex + 1) % (shaderResourceLocations.length + 1);

        if (this.shaderIndex != shaderCount)
        {
            try
            {
                logger.info("Selecting effect " + shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            }
            catch (IOException ioexception)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], ioexception);
                this.shaderIndex = shaderCount;
            }
            catch (JsonSyntaxException jsonsyntaxexception)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], jsonsyntaxexception);
                this.shaderIndex = shaderCount;
            }
        }
        else
        {
            this.theShaderGroup = null;
            logger.info("No effect selected");
        }
    }
}
项目:Cauldron    文件:EntityRenderer.java   
public void activateNextShader()
{
    if (OpenGlHelper.shadersSupported)
    {
        if (this.theShaderGroup != null)
        {
            this.theShaderGroup.deleteShaderGroup();
        }

        this.shaderIndex = (this.shaderIndex + 1) % (shaderResourceLocations.length + 1);

        if (this.shaderIndex != shaderCount)
        {
            try
            {
                logger.info("Selecting effect " + shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup = new ShaderGroup(this.mc.getTextureManager(), this.resourceManager, this.mc.getFramebuffer(), shaderResourceLocations[this.shaderIndex]);
                this.theShaderGroup.createBindFramebuffers(this.mc.displayWidth, this.mc.displayHeight);
            }
            catch (IOException ioexception)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], ioexception);
                this.shaderIndex = shaderCount;
            }
            catch (JsonSyntaxException jsonsyntaxexception)
            {
                logger.warn("Failed to load shader: " + shaderResourceLocations[this.shaderIndex], jsonsyntaxexception);
                this.shaderIndex = shaderCount;
            }
        }
        else
        {
            this.theShaderGroup = null;
            logger.info("No effect selected");
        }
    }
}
项目:Hackery    文件:HaClientUtils.java   
@SideOnly(Side.CLIENT)
public static void setShader(ResourceLocation sha){
    Minecraft mc = Minecraft.getMinecraft();
       try {
           mc.entityRenderer.theShaderGroup = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), sha);
       } catch (Exception e) {
           HackeryMod.logger.error("Something bad happened while swapping shaders");
           e.printStackTrace();
       }
       mc.entityRenderer.theShaderGroup.createBindFramebuffers(mc.displayWidth, mc.displayHeight);
}
项目:DecompiledMinecraft    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:BaseClient    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:BaseClient    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup() {
    return this.theShaderGroup;
}
项目:Backmemed    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:CustomWorldGen    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:4Space-5    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:ShadyMod    文件:ShaderBatch.java   
public ShaderGroup toShaderGroup(ShadyResManager resManager) throws JsonException
{
    return new ShaderGroup(Minecraft.getMinecraft().renderEngine, resManager, Minecraft.getMinecraft().getFramebuffer(), getResourceLocation());
}
项目:Resilience-Client-Source    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:4Space-1.7    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:ExpandedRailsMod    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:Cauldron    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}
项目:Cauldron    文件:EntityRenderer.java   
public ShaderGroup getShaderGroup()
{
    return this.theShaderGroup;
}