mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-18 03:25:17 +00:00
Custom images, textures, SSBO, and ShaderPack/ShaderProperties backports
This commit is contained in:
1 parent
6d60477b93
commit
bb52476d27
54 files changed
+2210
-494
No files matched your search
@@ -1,56 +1,40 @@
|
||||
package net.coderbot.iris.shaderpack;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.joml.Vector2f;
|
||||
import org.joml.Vector3i;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class ComputeSource {
|
||||
private final String name;
|
||||
@Getter private final String name;
|
||||
private final String source;
|
||||
private final ProgramSet parent;
|
||||
private Vector3i workGroups;
|
||||
private Vector2f workGroupRelative;
|
||||
@Getter private final ProgramSet parent;
|
||||
@Getter private final IndirectPointer indirectPointer;
|
||||
@Getter @Setter private Vector3i workGroups;
|
||||
@Getter @Setter private Vector2f workGroupRelative;
|
||||
|
||||
public ComputeSource(String name, String source, ProgramSet parent) {
|
||||
this(name, source, parent, null);
|
||||
}
|
||||
|
||||
public ComputeSource(String name, String source, ProgramSet parent, ShaderProperties properties) {
|
||||
this.name = name;
|
||||
this.source = source;
|
||||
this.parent = parent;
|
||||
this.indirectPointer = properties != null ? properties.getIndirectPointers().get(name) : null;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Optional<String> getSource() {
|
||||
public Optional<String> getSource() {
|
||||
return Optional.ofNullable(source);
|
||||
}
|
||||
|
||||
public ProgramSet getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
public boolean isValid() {
|
||||
return source != null;
|
||||
}
|
||||
|
||||
public void setWorkGroups(Vector3i workGroups) {
|
||||
this.workGroups = workGroups;
|
||||
}
|
||||
|
||||
public void setWorkGroupRelative(Vector2f workGroupRelative) {
|
||||
this.workGroupRelative = workGroupRelative;
|
||||
}
|
||||
|
||||
public Vector2f getWorkGroupRelative() {
|
||||
return workGroupRelative;
|
||||
}
|
||||
|
||||
public Vector3i getWorkGroups() {
|
||||
return workGroups;
|
||||
}
|
||||
|
||||
public Optional<ComputeSource> requireValid() {
|
||||
public Optional<ComputeSource> requireValid() {
|
||||
if (this.isValid()) {
|
||||
return Optional.of(this);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user