Package dev.cammiescorner.velvet.impl
Class ManagedSamplerUniformBase
java.lang.Object
dev.cammiescorner.velvet.impl.ManagedUniformBase
dev.cammiescorner.velvet.impl.ManagedSamplerUniformBase
- All Implemented Interfaces:
SamplerUniform
- Direct Known Subclasses:
ManagedSamplerUniformV1,ManagedSamplerUniformV2
public abstract class ManagedSamplerUniformBase
extends ManagedUniformBase
implements SamplerUniform
Mojank working in divergent branches for half a century,
ShaderInstance
is a copy of an old implementation of EffectInstance.
The latter has since been updated to have the EffectInstance.setSampler(String, IntSupplier)
while the former still uses ShaderInstance.setSampler(String, Object).
So we need to deal with both those extremely similar implementations
-
Field Summary
FieldsFields inherited from class dev.cammiescorner.velvet.impl.ManagedUniformBase
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfindUniformTarget(net.minecraft.client.renderer.ShaderInstance shader) booleanfindUniformTargets(List<net.minecraft.client.renderer.PostPass> shaders) protected abstract voidvoidsetDirect(int activeTexture) Sets the value of a sampler uniform declared in json using the Opengl texture slot id (between 0 and 30).Methods inherited from class dev.cammiescorner.velvet.impl.ManagedUniformBase
getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.cammiescorner.velvet.api.managed.uniform.SamplerUniform
set, set, set
-
Field Details
-
targets
-
locations
protected int[] locations -
cachedValue
-
-
Constructor Details
-
ManagedSamplerUniformBase
-
-
Method Details
-
findUniformTargets
- Specified by:
findUniformTargetsin classManagedUniformBase
-
findUniformTarget
public boolean findUniformTarget(net.minecraft.client.renderer.ShaderInstance shader) - Specified by:
findUniformTargetin classManagedUniformBase
-
set
-
setDirect
public void setDirect(int activeTexture) Description copied from interface:SamplerUniformSets the value of a sampler uniform declared in json using the Opengl texture slot id (between 0 and 30).- Specified by:
setDirectin interfaceSamplerUniform- Parameters:
activeTexture- the active texture id to be used by the sampler- See Also:
-