Fix lighting
This commit is contained in:
parent
0adb692c53
commit
1283068e18
|
@ -53275,18 +53275,10 @@ window.addEventListener("load", function() {
|
||||||
nms_Tessellator_setColorRGBA($this, $par1 >> 16 & 255, $par1 >> 8 & 255, $par1 & 255, $par2);
|
nms_Tessellator_setColorRGBA($this, $par1 >> 16 & 255, $par1 >> 8 & 255, $par1 & 255, $par2);
|
||||||
}
|
}
|
||||||
function nms_Tessellator_setNormal($this, $par1, $par2, $par3) {
|
function nms_Tessellator_setNormal($this, $par1, $par2, $par3) {
|
||||||
var $len, $var4, $var5, $var6, var$8;
|
var $len;
|
||||||
$this.$hasNormals = 1;
|
$this.$hasNormals = 1;
|
||||||
$len = jl_Math_sqrt($par1 * $par1 + $par2 * $par2 + $par3 * $par3);
|
$len = jl_Math_sqrt($par1 * $par1 + $par2 * $par2 + $par3 * $par3);
|
||||||
$var4 = ($par1 / $len * 127.0 | 0) + 127 | 0;
|
$this.$normal = (($par1 / $len * 127.0 | 0) + 127 | 0) & 255 | ((($par2 / $len * 127.0 | 0) + 127 | 0) & 255) << 8 | ((($par3 / $len * 127.0 | 0) + 127 | 0) & 255) << 16;
|
||||||
$var5 = ($par2 / $len * 127.0 | 0) + 127 | 0;
|
|
||||||
$var6 = ($par3 / $len * 127.0 | 0) + 127 | 0;
|
|
||||||
$var4 = $var4 & 255;
|
|
||||||
var$8 = ($var5 & 255) << 8;
|
|
||||||
$var5 = $var4 | var$8;
|
|
||||||
$var6 = ($var6 & 255) << 16;
|
|
||||||
$this.$normal = $var5 | $var6;
|
|
||||||
olo_EaglerAdapterGL30_glNormal3f($var4, var$8, $var6);
|
|
||||||
}
|
}
|
||||||
function nms_Tessellator_setTranslationD($this, $par1, $par3, $par5) {
|
function nms_Tessellator_setTranslationD($this, $par1, $par3, $par5) {
|
||||||
$this.$xOffset = $par1;
|
$this.$xOffset = $par1;
|
||||||
|
@ -80242,9 +80234,22 @@ window.addEventListener("load", function() {
|
||||||
olo_EaglerAdapterGL30_glDisable(16384);
|
olo_EaglerAdapterGL30_glDisable(16384);
|
||||||
}
|
}
|
||||||
function nms_RenderHelper_enableStandardItemLighting() {
|
function nms_RenderHelper_enableStandardItemLighting() {
|
||||||
var var$1, var$2;
|
var $var3, var$2;
|
||||||
|
olo_EaglerAdapterGL30_glPushMatrix();
|
||||||
|
$var3 = nms_Vec3D_normalize(nms_Vec3D_createVector(0.20000000298023224, 1.0, (-0.699999988079071)));
|
||||||
|
olo_EaglerAdapterGL30_glRotatef($var3.$xCoord, $var3.$yCoord, $var3.$zCoord, 0.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.4000000059604645, 0.6000000238418579, 0.0);
|
||||||
|
$var3 = nms_Vec3D_normalize(nms_Vec3D_createVector((-0.20000000298023224), 1.0, 0.699999988079071));
|
||||||
|
olo_EaglerAdapterGL30_glRotatef($var3.$xCoord, $var3.$yCoord, $var3.$zCoord, 0.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
olo_EaglerAdapterGL30_glEnable(2896);
|
olo_EaglerAdapterGL30_glEnable(2896);
|
||||||
olo_EaglerAdapterGL30_glEnable(16384);
|
olo_EaglerAdapterGL30_glEnable(16384);
|
||||||
|
olo_EaglerAdapterGL30_glEnable(16385);
|
||||||
olo_EaglerAdapterGL30_glEnable(2903);
|
olo_EaglerAdapterGL30_glEnable(2903);
|
||||||
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos0vec0, olo_EaglerAdapterGL30_lightPos0vec);
|
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos0vec0, olo_EaglerAdapterGL30_lightPos0vec);
|
||||||
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos1vec0, olo_EaglerAdapterGL30_lightPos1vec);
|
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos1vec0, olo_EaglerAdapterGL30_lightPos1vec);
|
||||||
|
@ -80252,20 +80257,21 @@ window.addEventListener("load", function() {
|
||||||
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos0vec);
|
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos0vec);
|
||||||
nPgv_Vector4f_set0(olo_EaglerAdapterGL30_lightPos1vec, (-0.20000000298023224), 1.0, 0.699999988079071, 0.0);
|
nPgv_Vector4f_set0(olo_EaglerAdapterGL30_lightPos1vec, (-0.20000000298023224), 1.0, 0.699999988079071, 0.0);
|
||||||
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos1vec);
|
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos1vec);
|
||||||
var$1 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
$var3 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
||||||
var$2 = olo_EaglerAdapterGL30_lightPos0vec;
|
var$2 = olo_EaglerAdapterGL30_lightPos0vec;
|
||||||
nPgv_Vector_normalise(nPgv_Matrix4f_transform(var$1, var$2, var$2));
|
nPgv_Vector_normalise(nPgv_Matrix4f_transform($var3, var$2, var$2));
|
||||||
var$1 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
$var3 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
||||||
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
||||||
nPgv_Vector_normalise(nPgv_Matrix4f_transform(var$1, var$2, var$2));
|
nPgv_Vector_normalise(nPgv_Matrix4f_transform($var3, var$2, var$2));
|
||||||
var$1 = olo_EaglerAdapterGL30_lightPos0vec;
|
$var3 = olo_EaglerAdapterGL30_lightPos0vec;
|
||||||
var$1.$x0 = -var$1.$x0;
|
$var3.$x0 = -$var3.$x0;
|
||||||
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
||||||
var$2.$x0 = -var$2.$x0;
|
var$2.$x0 = -var$2.$x0;
|
||||||
var$1.$y0 = -var$1.$y0;
|
$var3.$y0 = -$var3.$y0;
|
||||||
var$2.$y0 = -var$2.$y0;
|
var$2.$y0 = -var$2.$y0;
|
||||||
var$1.$z0 = -var$1.$z0;
|
$var3.$z0 = -$var3.$z0;
|
||||||
var$2.$z0 = -var$2.$z0;
|
var$2.$z0 = -var$2.$z0;
|
||||||
|
olo_EaglerAdapterGL30_glPopMatrix();
|
||||||
}
|
}
|
||||||
function nms_GuiChat() {
|
function nms_GuiChat() {
|
||||||
var a = this; nms_GuiScreen.call(a);
|
var a = this; nms_GuiScreen.call(a);
|
||||||
|
|
|
@ -9,11 +9,32 @@ public class RenderHelper {
|
||||||
GL11.glDisable(16384);
|
GL11.glDisable(16384);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void enableStandardItemLighting() {
|
public static void enableStandardItemLighting2() {
|
||||||
GL11.glEnable(2896);
|
GL11.glEnable(2896);
|
||||||
GL11.glEnable(16384);
|
GL11.glEnable(16384);
|
||||||
GL11.glEnable(2903);
|
GL11.glEnable(16385);
|
||||||
GL11.glColorMaterial(1032, 5634);
|
GL11.glEnable(2903);
|
||||||
|
GL11.glColorMaterial(1032, 5634);
|
||||||
GL11.copyModelToLightMatrix();
|
GL11.copyModelToLightMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void enableStandardItemLighting() {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
float var0 = 0.4F;
|
||||||
|
float var1 = 0.6F;
|
||||||
|
float var2 = 0.0F;
|
||||||
|
Vec3D var3 = Vec3D.createVector((double)0.2F, 1.0D, (double)-0.7F).normalize();
|
||||||
|
GL11.glRotatef((float)var3.xCoord, (float)var3.yCoord, (float)var3.zCoord, 0.0F);
|
||||||
|
GL11.glRotatef(var1, var1, var1, 1.0F);
|
||||||
|
GL11.glRotatef(0.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
GL11.glRotatef(var2, var2, var2, 1.0F);
|
||||||
|
GL11.glRotatef(var2, var0, var1, var2);
|
||||||
|
var3 = Vec3D.createVector((double)-0.2F, 1.0D, (double)0.7F).normalize();
|
||||||
|
GL11.glRotatef((float)var3.xCoord, (float)var3.yCoord, (float)var3.zCoord, 0.0F);
|
||||||
|
GL11.glRotatef(var1, var1, var1, 1.0F);
|
||||||
|
GL11.glRotatef(0.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
GL11.glRotatef(var2, var2, var2, 1.0F);
|
||||||
|
enableStandardItemLighting2();
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -266,7 +266,6 @@ public class Tessellator {
|
||||||
int var5 = (int)((par2 / len) * 127.0F) + 127;
|
int var5 = (int)((par2 / len) * 127.0F) + 127;
|
||||||
int var6 = (int)((par3 / len) * 127.0F) + 127;
|
int var6 = (int)((par3 / len) * 127.0F) + 127;
|
||||||
this.normal = var4 & 255 | (var5 & 255) << 8 | (var6 & 255) << 16;
|
this.normal = var4 & 255 | (var5 & 255) << 8 | (var6 & 255) << 16;
|
||||||
GL11.glNormal3f(var4 & 255, (var5 & 255) << 8, (var6 & 255) << 16);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -53253,18 +53253,10 @@
|
||||||
nms_Tessellator_setColorRGBA($this, $par1 >> 16 & 255, $par1 >> 8 & 255, $par1 & 255, $par2);
|
nms_Tessellator_setColorRGBA($this, $par1 >> 16 & 255, $par1 >> 8 & 255, $par1 & 255, $par2);
|
||||||
}
|
}
|
||||||
function nms_Tessellator_setNormal($this, $par1, $par2, $par3) {
|
function nms_Tessellator_setNormal($this, $par1, $par2, $par3) {
|
||||||
var $len, $var4, $var5, $var6, var$8;
|
var $len;
|
||||||
$this.$hasNormals = 1;
|
$this.$hasNormals = 1;
|
||||||
$len = jl_Math_sqrt($par1 * $par1 + $par2 * $par2 + $par3 * $par3);
|
$len = jl_Math_sqrt($par1 * $par1 + $par2 * $par2 + $par3 * $par3);
|
||||||
$var4 = ($par1 / $len * 127.0 | 0) + 127 | 0;
|
$this.$normal = (($par1 / $len * 127.0 | 0) + 127 | 0) & 255 | ((($par2 / $len * 127.0 | 0) + 127 | 0) & 255) << 8 | ((($par3 / $len * 127.0 | 0) + 127 | 0) & 255) << 16;
|
||||||
$var5 = ($par2 / $len * 127.0 | 0) + 127 | 0;
|
|
||||||
$var6 = ($par3 / $len * 127.0 | 0) + 127 | 0;
|
|
||||||
$var4 = $var4 & 255;
|
|
||||||
var$8 = ($var5 & 255) << 8;
|
|
||||||
$var5 = $var4 | var$8;
|
|
||||||
$var6 = ($var6 & 255) << 16;
|
|
||||||
$this.$normal = $var5 | $var6;
|
|
||||||
olo_EaglerAdapterGL30_glNormal3f($var4, var$8, $var6);
|
|
||||||
}
|
}
|
||||||
function nms_Tessellator_setTranslationD($this, $par1, $par3, $par5) {
|
function nms_Tessellator_setTranslationD($this, $par1, $par3, $par5) {
|
||||||
$this.$xOffset = $par1;
|
$this.$xOffset = $par1;
|
||||||
|
@ -80220,9 +80212,22 @@
|
||||||
olo_EaglerAdapterGL30_glDisable(16384);
|
olo_EaglerAdapterGL30_glDisable(16384);
|
||||||
}
|
}
|
||||||
function nms_RenderHelper_enableStandardItemLighting() {
|
function nms_RenderHelper_enableStandardItemLighting() {
|
||||||
var var$1, var$2;
|
var $var3, var$2;
|
||||||
|
olo_EaglerAdapterGL30_glPushMatrix();
|
||||||
|
$var3 = nms_Vec3D_normalize(nms_Vec3D_createVector(0.20000000298023224, 1.0, (-0.699999988079071)));
|
||||||
|
olo_EaglerAdapterGL30_glRotatef($var3.$xCoord, $var3.$yCoord, $var3.$zCoord, 0.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.4000000059604645, 0.6000000238418579, 0.0);
|
||||||
|
$var3 = nms_Vec3D_normalize(nms_Vec3D_createVector((-0.20000000298023224), 1.0, 0.699999988079071));
|
||||||
|
olo_EaglerAdapterGL30_glRotatef($var3.$xCoord, $var3.$yCoord, $var3.$zCoord, 0.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.6000000238418579, 0.6000000238418579, 0.6000000238418579, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
|
olo_EaglerAdapterGL30_glRotatef(0.0, 0.0, 0.0, 1.0);
|
||||||
olo_EaglerAdapterGL30_glEnable(2896);
|
olo_EaglerAdapterGL30_glEnable(2896);
|
||||||
olo_EaglerAdapterGL30_glEnable(16384);
|
olo_EaglerAdapterGL30_glEnable(16384);
|
||||||
|
olo_EaglerAdapterGL30_glEnable(16385);
|
||||||
olo_EaglerAdapterGL30_glEnable(2903);
|
olo_EaglerAdapterGL30_glEnable(2903);
|
||||||
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos0vec0, olo_EaglerAdapterGL30_lightPos0vec);
|
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos0vec0, olo_EaglerAdapterGL30_lightPos0vec);
|
||||||
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos1vec0, olo_EaglerAdapterGL30_lightPos1vec);
|
nPgv_Vector4f_set(olo_EaglerAdapterGL30_lightPos1vec0, olo_EaglerAdapterGL30_lightPos1vec);
|
||||||
|
@ -80230,20 +80235,21 @@
|
||||||
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos0vec);
|
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos0vec);
|
||||||
nPgv_Vector4f_set0(olo_EaglerAdapterGL30_lightPos1vec, (-0.20000000298023224), 1.0, 0.699999988079071, 0.0);
|
nPgv_Vector4f_set0(olo_EaglerAdapterGL30_lightPos1vec, (-0.20000000298023224), 1.0, 0.699999988079071, 0.0);
|
||||||
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos1vec);
|
nPgv_Vector_normalise(olo_EaglerAdapterGL30_lightPos1vec);
|
||||||
var$1 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
$var3 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
||||||
var$2 = olo_EaglerAdapterGL30_lightPos0vec;
|
var$2 = olo_EaglerAdapterGL30_lightPos0vec;
|
||||||
nPgv_Vector_normalise(nPgv_Matrix4f_transform(var$1, var$2, var$2));
|
nPgv_Vector_normalise(nPgv_Matrix4f_transform($var3, var$2, var$2));
|
||||||
var$1 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
$var3 = olo_EaglerAdapterGL30_matModelV.data[olo_EaglerAdapterGL30_matModelPointer];
|
||||||
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
||||||
nPgv_Vector_normalise(nPgv_Matrix4f_transform(var$1, var$2, var$2));
|
nPgv_Vector_normalise(nPgv_Matrix4f_transform($var3, var$2, var$2));
|
||||||
var$1 = olo_EaglerAdapterGL30_lightPos0vec;
|
$var3 = olo_EaglerAdapterGL30_lightPos0vec;
|
||||||
var$1.$x0 = -var$1.$x0;
|
$var3.$x0 = -$var3.$x0;
|
||||||
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
var$2 = olo_EaglerAdapterGL30_lightPos1vec;
|
||||||
var$2.$x0 = -var$2.$x0;
|
var$2.$x0 = -var$2.$x0;
|
||||||
var$1.$y0 = -var$1.$y0;
|
$var3.$y0 = -$var3.$y0;
|
||||||
var$2.$y0 = -var$2.$y0;
|
var$2.$y0 = -var$2.$y0;
|
||||||
var$1.$z0 = -var$1.$z0;
|
$var3.$z0 = -$var3.$z0;
|
||||||
var$2.$z0 = -var$2.$z0;
|
var$2.$z0 = -var$2.$z0;
|
||||||
|
olo_EaglerAdapterGL30_glPopMatrix();
|
||||||
}
|
}
|
||||||
function nms_GuiChat() {
|
function nms_GuiChat() {
|
||||||
var a = this; nms_GuiScreen.call(a);
|
var a = this; nms_GuiScreen.call(a);
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user