mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Pass through some rendering. This is gonna take a while.
This commit is contained in:
1 parent
24e777cab5
commit
0ae8c3acf8
7 files changed
+99
-132
No files matched your search
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.client.render.entity;
|
||||
|
||||
import com.mojang.blaze3d.platform.GLX;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
|
||||
import net.minecraft.client.renderer.entity.BipedRenderer;
|
||||
@@ -35,30 +36,30 @@ public class RenderDoppleganger extends BipedRenderer<EntityDoppleganger, BipedM
|
||||
|
||||
public static final ShaderCallback callback = shader -> {
|
||||
// Frag Uniforms
|
||||
int disfigurationUniform = GLX.glGetUniformLocation(shader, "disfiguration");
|
||||
int disfigurationUniform = GlStateManager.getUniformLocation(shader, "disfiguration");
|
||||
ShaderHelper.FLOAT_BUF.position(0);
|
||||
ShaderHelper.FLOAT_BUF.put(0, disfiguration);
|
||||
GLX.glUniform1(disfigurationUniform, ShaderHelper.FLOAT_BUF);
|
||||
GlStateManager.uniform1(disfigurationUniform, ShaderHelper.FLOAT_BUF);
|
||||
|
||||
// Vert Uniforms
|
||||
int grainIntensityUniform = GLX.glGetUniformLocation(shader, "grainIntensity");
|
||||
int grainIntensityUniform = GlStateManager.getUniformLocation(shader, "grainIntensity");
|
||||
ShaderHelper.FLOAT_BUF.position(0);
|
||||
ShaderHelper.FLOAT_BUF.put(0, grainIntensity);
|
||||
GLX.glUniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
|
||||
GlStateManager.uniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
|
||||
};
|
||||
|
||||
public static final ShaderCallback defaultCallback = shader -> {
|
||||
// Frag Uniforms
|
||||
int disfigurationUniform = GLX.glGetUniformLocation(shader, "disfiguration");
|
||||
int disfigurationUniform = GlStateManager.getUniformLocation(shader, "disfiguration");
|
||||
ShaderHelper.FLOAT_BUF.position(0);
|
||||
ShaderHelper.FLOAT_BUF.put(0, DEFAULT_DISFIGURATION);
|
||||
GLX.glUniform1(disfigurationUniform, ShaderHelper.FLOAT_BUF);
|
||||
GlStateManager.uniform1(disfigurationUniform, ShaderHelper.FLOAT_BUF);
|
||||
|
||||
// Vert Uniforms
|
||||
int grainIntensityUniform = GLX.glGetUniformLocation(shader, "grainIntensity");
|
||||
int grainIntensityUniform = GlStateManager.getUniformLocation(shader, "grainIntensity");
|
||||
ShaderHelper.FLOAT_BUF.position(0);
|
||||
ShaderHelper.FLOAT_BUF.put(0, DEFAULT_GRAIN_INTENSITY);
|
||||
GLX.glUniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
|
||||
GlStateManager.uniform1(grainIntensityUniform, ShaderHelper.FLOAT_BUF);
|
||||
};
|
||||
|
||||
public RenderDoppleganger(EntityRendererManager renderManager) {
|
||||
@@ -83,7 +84,7 @@ public class RenderDoppleganger extends BipedRenderer<EntityDoppleganger, BipedM
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(@Nonnull EntityDoppleganger entity) {
|
||||
public ResourceLocation getEntityTexture(@Nonnull EntityDoppleganger entity) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
|
||||
if(!(mc.getRenderViewEntity() instanceof AbstractClientPlayerEntity))
|
||||
|
||||
Reference in new issue
Block a user