First pass functional texture pack shader :)

This commit is contained in:
Mike Primm 2011-07-16 16:51:46 -05:00
parent edac2e5cd9
commit d21d640eae
15 changed files with 381 additions and 83 deletions

View file

@ -88,6 +88,7 @@ public class IsoHDPerspective implements HDPerspective {
double t_next_y, t_next_x, t_next_z;
boolean nonairhit;
int subalpha;
double mt;
/**
* Get sky light level - only available if shader requested it
*/
@ -363,7 +364,7 @@ public class IsoHDPerspective implements HDPerspective {
private boolean raytraceSubblock(short[] model) {
int mx = 0, my = 0, mz = 0;
double xx, yy, zz;
double mt = t + 0.0000001;
mt = t + 0.0000001;
xx = top.x + mt *(bottom.x - top.x);
yy = top.y + mt *(bottom.y - top.y);
zz = top.z + mt *(bottom.z - top.z);
@ -453,7 +454,17 @@ public class IsoHDPerspective implements HDPerspective {
}
return true;
}
public void getSubblockCoord(int[] v) {
double tt = t + 0.000001;
if(subalpha >= 0)
tt = mt;
double xx = top.x + tt * (bottom.x - top.x);
double yy = top.y + tt * (bottom.y - top.y);
double zz = top.z + tt * (bottom.z - top.z);
v[0] = (int)((xx - Math.floor(xx)) * modscale);
v[1] = (int)((yy - Math.floor(yy)) * modscale);
v[2] = (int)((zz - Math.floor(zz)) * modscale);
}
}
public IsoHDPerspective(ConfigurationNode configuration) {
@ -856,6 +867,10 @@ public class IsoHDPerspective implements HDPerspective {
return scale;
}
public int getModelScale() {
return modscale;
}
@Override
public String getName() {
return name;