forked from IrisShaders/Iris
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
840aacd
commit d382b26
Showing
16 changed files
with
178 additions
and
240 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
src/main/java/com/seibel/distanthorizons/api/interfaces/override/IDhApiOverrideable.java
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
...va/com/seibel/distanthorizons/api/interfaces/override/rendering/IDhApiCullingFrustum.java
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
.../seibel/distanthorizons/api/interfaces/override/rendering/IDhApiShadowCullingFrustum.java
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
...ain/java/com/seibel/distanthorizons/coreapi/interfaces/dependencyInjection/IBindable.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
src/main/java/net/irisshaders/iris/compat/dh/mixin/AdvancedShadowCullingFrustumMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.irisshaders.iris.compat.dh.mixin; | ||
|
||
import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiShadowCullingFrustum; | ||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f; | ||
import net.irisshaders.iris.shadows.frustum.advanced.AdvancedShadowCullingFrustum; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(value = AdvancedShadowCullingFrustum.class, remap = false) | ||
public class AdvancedShadowCullingFrustumMixin implements IDhApiShadowCullingFrustum { | ||
@Shadow | ||
private int worldMinYDH; | ||
@Shadow | ||
private int worldMaxYDH; | ||
@Shadow | ||
public int isVisible(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) { | ||
throw new AssertionError(); | ||
} | ||
|
||
@Override | ||
public void update(int worldMinBlockY, int worldMaxBlockY, Mat4f worldViewProjection) { | ||
this.worldMinYDH = worldMinBlockY; | ||
this.worldMaxYDH = worldMaxBlockY; | ||
} | ||
|
||
@Override | ||
public boolean intersects(int lodBlockPosMinX, int lodBlockPosMinZ, int lodBlockWidth, int lodDetailLevel) { | ||
return this.isVisible(lodBlockPosMinX, this.worldMinYDH, lodBlockPosMinZ, lodBlockPosMinX + lodBlockWidth, this.worldMaxYDH, lodBlockPosMinZ + lodBlockWidth) != 0; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/net/irisshaders/iris/compat/dh/mixin/BoxCullingFrustumMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package net.irisshaders.iris.compat.dh.mixin; | ||
|
||
import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiShadowCullingFrustum; | ||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f; | ||
import net.irisshaders.iris.shadows.frustum.BoxCuller; | ||
import net.irisshaders.iris.shadows.frustum.fallback.BoxCullingFrustum; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(value = BoxCullingFrustum.class, remap = false) | ||
public class BoxCullingFrustumMixin implements IDhApiShadowCullingFrustum { | ||
@Shadow | ||
@Final | ||
protected BoxCuller boxCuller; | ||
@Shadow | ||
private int worldMinYDH; | ||
@Shadow | ||
private int worldMaxYDH; | ||
|
||
@Override | ||
public void update(int worldMinBlockY, int worldMaxBlockY, Mat4f worldViewProjection) { | ||
this.worldMinYDH = worldMinBlockY; | ||
this.worldMaxYDH = worldMaxBlockY; | ||
} | ||
|
||
@Override | ||
public boolean intersects(int lodBlockPosMinX, int lodBlockPosMinZ, int lodBlockWidth, int lodDetailLevel) { | ||
return !boxCuller.isCulled(lodBlockPosMinX, this.worldMinYDH, lodBlockPosMinZ, lodBlockPosMinX + lodBlockWidth, this.worldMaxYDH, lodBlockPosMinZ + lodBlockWidth); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/net/irisshaders/iris/compat/dh/mixin/CullEverythingFrustumMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.irisshaders.iris.compat.dh.mixin; | ||
|
||
import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiShadowCullingFrustum; | ||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f; | ||
import net.irisshaders.iris.shadows.frustum.CullEverythingFrustum; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(value = CullEverythingFrustum.class, remap = false) | ||
public class CullEverythingFrustumMixin implements IDhApiShadowCullingFrustum { | ||
@Override | ||
public void update(int worldMinBlockY, int worldMaxBlockY, Mat4f worldViewProjection) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean intersects(int lodBlockPosMinX, int lodBlockPosMinZ, int lodBlockWidth, int lodDetailLevel) { | ||
return false; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/net/irisshaders/iris/compat/dh/mixin/NonCullingFrustumMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.irisshaders.iris.compat.dh.mixin; | ||
|
||
import com.seibel.distanthorizons.api.interfaces.override.rendering.IDhApiShadowCullingFrustum; | ||
import com.seibel.distanthorizons.coreapi.util.math.Mat4f; | ||
import net.irisshaders.iris.shadows.frustum.fallback.NonCullingFrustum; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(value = NonCullingFrustum.class, remap = false) | ||
public class NonCullingFrustumMixin implements IDhApiShadowCullingFrustum { | ||
@Override | ||
public void update(int worldMinBlockY, int worldMaxBlockY, Mat4f worldViewProjection) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean intersects(int lodBlockPosMinX, int lodBlockPosMinZ, int lodBlockWidth, int lodDetailLevel) { | ||
return true; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/main/java/net/irisshaders/iris/compat/dh/mixin/OculusDHCompatMixinPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package net.irisshaders.iris.compat.dh.mixin; | ||
|
||
import net.minecraftforge.fml.loading.LoadingModList; | ||
import org.objectweb.asm.tree.ClassNode; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class OculusDHCompatMixinPlugin implements IMixinConfigPlugin { | ||
@Override | ||
public void onLoad(String s) { | ||
|
||
} | ||
|
||
@Override | ||
public String getRefMapperConfig() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean shouldApplyMixin(String s, String s1) { | ||
return LoadingModList.get().getModFileById("distanthorizons") != null; | ||
} | ||
|
||
@Override | ||
public void acceptTargets(Set<String> set, Set<String> set1) { | ||
|
||
} | ||
|
||
@Override | ||
public List<String> getMixins() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void preApply(String s, ClassNode classNode, String s1, IMixinInfo iMixinInfo) { | ||
|
||
} | ||
|
||
@Override | ||
public void postApply(String s, ClassNode classNode, String s1, IMixinInfo iMixinInfo) { | ||
|
||
} | ||
} |
Oops, something went wrong.