mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-15 09:44:52 +00:00
Port shadow translucent (aka shadow_water) from upstream (#1628)
This commit is contained in:
1 parent
80f9724ee6
commit
4acb83be6a
8 files changed
+47
-11
No files matched your search
@@ -16,6 +16,7 @@ public class ProgramSet {
|
||||
private final PackDirectives packDirectives;
|
||||
|
||||
private final ProgramSource shadow;
|
||||
private final ProgramSource shadowWater;
|
||||
private final ComputeSource[] shadowCompute;
|
||||
|
||||
private final ProgramSource[] shadowcomp;
|
||||
@@ -80,6 +81,8 @@ public class ProgramSet {
|
||||
// - https://github.com/IrisShaders/Iris/issues/987
|
||||
this.shadow = readProgramSource(directory, sourceProvider, "shadow", this, shaderProperties,
|
||||
BlendModeOverride.OFF);
|
||||
this.shadowWater = readProgramSource(directory, sourceProvider, "shadow_water", this, shaderProperties,
|
||||
BlendModeOverride.OFF);
|
||||
this.shadowCompute = readComputeArray(directory, sourceProvider, "shadow");
|
||||
|
||||
this.shadowcomp = readProgramArray(directory, sourceProvider, "shadowcomp", shaderProperties);
|
||||
@@ -218,6 +221,7 @@ public class ProgramSet {
|
||||
List<ComputeSource> computes = new ArrayList<>();
|
||||
|
||||
programs.add(shadow);
|
||||
programs.add(shadowWater);
|
||||
programs.addAll(Arrays.asList(shadowcomp));
|
||||
programs.addAll(Arrays.asList(begin));
|
||||
programs.addAll(Arrays.asList(prepare));
|
||||
@@ -302,6 +306,10 @@ public class ProgramSet {
|
||||
return shadow.requireValid();
|
||||
}
|
||||
|
||||
public Optional<ProgramSource> getShadowWater() {
|
||||
return shadowWater.requireValid();
|
||||
}
|
||||
|
||||
public ProgramSource[] getShadowComposite() {
|
||||
return shadowcomp;
|
||||
}
|
||||
@@ -413,6 +421,7 @@ public class ProgramSet {
|
||||
public Optional<ProgramSource> get(ProgramId programId) {
|
||||
return switch (programId) {
|
||||
case Shadow -> getShadow();
|
||||
case ShadowWater -> first(getShadowWater(), getShadow());
|
||||
case Basic -> getGbuffersBasic();
|
||||
case Line -> gbuffersLine.requireValid();
|
||||
case Textured -> getGbuffersTextured();
|
||||
|
||||
Reference in new issue
Block a user