Make default shader more consistent with Kzed shader
This commit is contained in:
parent
de2cdf5411
commit
bd69a69aff
2 changed files with 8 additions and 6 deletions
|
|
@ -132,7 +132,7 @@ public class ColorScheme {
|
|||
c[1] = new Color(Integer.parseInt(split[9]), Integer.parseInt(split[10]), Integer.parseInt(split[11]), Integer.parseInt(split[12]));
|
||||
c[2] = new Color(Integer.parseInt(split[13]), Integer.parseInt(split[14]), Integer.parseInt(split[15]), Integer.parseInt(split[16]));
|
||||
/* Blended color - for 'smooth' option on flat map */
|
||||
c[4] = new Color((c[0].getRed()+c[2].getRed())/2, (c[0].getGreen()+c[2].getGreen())/2, (c[0].getBlue()+c[2].getBlue())/2, (c[0].getAlpha()+c[2].getAlpha())/2);
|
||||
c[4] = new Color((c[1].getRed()+c[3].getRed())/2, (c[1].getGreen()+c[3].getGreen())/2, (c[1].getBlue()+c[3].getBlue())/2, (c[1].getAlpha()+c[3].getAlpha())/2);
|
||||
|
||||
if(isbiome) {
|
||||
if(istemp) {
|
||||
|
|
|
|||
|
|
@ -142,18 +142,21 @@ public class DefaultHDShader implements HDShader {
|
|||
|
||||
if (colors != null) {
|
||||
int seq;
|
||||
int subalpha = ps.getSubmodelAlpha();
|
||||
/* Figure out which color to use */
|
||||
switch(ps.getLastBlockStep()) {
|
||||
case X_PLUS:
|
||||
case X_MINUS:
|
||||
seq = 0;
|
||||
seq = 2;
|
||||
break;
|
||||
case Z_PLUS:
|
||||
case Z_MINUS:
|
||||
seq = 2;
|
||||
seq = 0;
|
||||
break;
|
||||
default:
|
||||
if(((pixelodd + mapiter.getY()) & 0x03) == 0)
|
||||
if(subalpha >= 0) /* We hit a block in a model */
|
||||
seq = 4; /* Use smooth top */
|
||||
else if(((pixelodd + mapiter.getY()) & 0x03) == 0)
|
||||
seq = 3;
|
||||
else
|
||||
seq = 1;
|
||||
|
|
@ -164,10 +167,9 @@ public class DefaultHDShader implements HDShader {
|
|||
/* Handle light level, if needed */
|
||||
lighting.applyLighting(ps, this, c, tmpcolor);
|
||||
/* If we got alpha from subblock model, use it instead */
|
||||
int subalpha = ps.getSubmodelAlpha();
|
||||
if(subalpha >= 0) {
|
||||
for(Color clr : tmpcolor)
|
||||
clr.setAlpha(subalpha);
|
||||
clr.setAlpha(Math.max(subalpha,clr.getAlpha()));
|
||||
}
|
||||
/* Blend color with accumulated color (weighted by alpha) */
|
||||
if(!transparency) { /* No transparency support */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue