Improve cave render - finish 'onlyiflit' support
This commit is contained in:
parent
96a2978548
commit
2c3ec9e001
4 changed files with 25 additions and 7 deletions
|
|
@ -102,18 +102,21 @@ public class CaveHDShader implements HDShader {
|
|||
int blocktype = ps.getBlockTypeID();
|
||||
switch (blocktype) {
|
||||
case 0:
|
||||
case 20:
|
||||
case 18:
|
||||
case 17:
|
||||
case 18:
|
||||
case 20:
|
||||
case 64:
|
||||
case 71:
|
||||
case 78:
|
||||
case 79:
|
||||
blocktype = 0;
|
||||
break;
|
||||
default:
|
||||
air = false;
|
||||
return false;
|
||||
}
|
||||
if (!air) {
|
||||
if(iflit && (ps.getEmittedLightLevel() == 0)) {
|
||||
if ((blocktype == 0) && !air) {
|
||||
if(iflit && (ps.getMapIterator().getBlockEmittedLight() == 0)) {
|
||||
return false;
|
||||
}
|
||||
int cr, cg, cb;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package org.dynmap.hdmap;
|
||||
|
||||
import org.dynmap.utils.MapIterator;
|
||||
import org.dynmap.utils.MapIterator.BlockStep;
|
||||
import org.dynmap.utils.Vector3D;
|
||||
|
||||
|
|
@ -56,4 +57,8 @@ public interface HDPerspectiveState {
|
|||
* Return subblock coordinates of current ray position
|
||||
*/
|
||||
int[] getSubblockCoord();
|
||||
/**
|
||||
* Get map iterator
|
||||
*/
|
||||
MapIterator getMapIterator();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,6 +240,10 @@ public class IsoHDPerspective implements HDPerspective {
|
|||
* Get pixel Y coordinate
|
||||
*/
|
||||
public final int getPixelY() { return py; }
|
||||
/**
|
||||
* Get map iterator
|
||||
*/
|
||||
public final MapIterator getMapIterator() { return mapiter; }
|
||||
/**
|
||||
* Return submodel alpha value (-1 if no submodel rendered)
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue