Interface TextureUniformAccess
- All Known Subinterfaces:
ShaderProgram
- All Known Implementing Classes:
DynamicShaderProgramImpl,ShaderProgramImpl
public interface TextureUniformAccess
Provides write access to all textures in a shader program.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbindSamplers(int samplerStart) Loads the samplers set bysetSampler(CharSequence, int)into the shader.voidbindSamplers(ShaderTextureSource.Context context, int samplerStart) Loads the samplers set bysetSampler(CharSequence, int)into the shader.voidClears all samplers.voidremoveSampler(CharSequence name) Removes the specified sampler binding.default voidsetFramebufferSamplers(AdvancedFbo framebuffer) SetsDiffuseSampler0-DiffuseSamplerMaxto the color buffers in the specified framebuffer.static voidsetFramebufferSamplers(net.minecraft.client.renderer.ShaderInstance instance, AdvancedFbo framebuffer) SetsDiffuseSampler0-DiffuseSamplerMaxto the color buffers in the specified framebuffer.default voidsetSampler(CharSequence name, int textureId) Adds a texture that is dynamically bound and sets texture units.voidsetSampler(CharSequence name, int textureId, int samplerId) Adds a texture that is dynamically bound and sets texture units.default voidsetSampler(CharSequence name, net.minecraft.resources.ResourceLocation location) Adds a texture that is dynamically bound and sets texture units.default voidsetSampler(CharSequence name, net.minecraft.resources.ResourceLocation location, int samplerId) Adds a texture that is dynamically bound and sets texture units.
-
Method Details
-
setFramebufferSamplers
SetsDiffuseSampler0-DiffuseSamplerMaxto the color buffers in the specified framebuffer.
Also setsDiffuseDepthSamplerif the framebuffer has a depth attachment.- Parameters:
framebuffer- The framebuffer to bind samplers from
-
setSampler
Adds a texture that is dynamically bound and sets texture units.- Parameters:
name- The name of the texture to setlocation- The name of the texture in the texture manager to bind and assign a texture unit- Since:
- 2.5.0
-
setSampler
default void setSampler(CharSequence name, net.minecraft.resources.ResourceLocation location, int samplerId) Adds a texture that is dynamically bound and sets texture units.- Parameters:
name- The name of the texture to setlocation- The name of the texture in the texture manager to bind and assign a texture unitsamplerId- The id of the sampler assign a texture unit- Since:
- 2.5.0
-
setSampler
Adds a texture that is dynamically bound and sets texture units.- Parameters:
name- The name of the texture to settextureId- The id of the texture to bind and assign a texture unit
-
setSampler
Adds a texture that is dynamically bound and sets texture units.- Parameters:
name- The name of the texture to settextureId- The id of the texture to bind and assign a texture unitsamplerId- The id of the sampler assign a texture unit
-
removeSampler
Removes the specified sampler binding. This will effectively make it a missing texture.- Parameters:
name- The name of the sampler to remove
-
bindSamplers
default void bindSamplers(int samplerStart) Loads the samplers set bysetSampler(CharSequence, int)into the shader.- Parameters:
samplerStart- The sampler to start binding to
-
bindSamplers
Loads the samplers set bysetSampler(CharSequence, int)into the shader.- Parameters:
context- The context for setting built-in shader samplers ornullto ignore normal samplerssamplerStart- The sampler to start binding to
-
clearSamplers
void clearSamplers()Clears all samplers. -
setFramebufferSamplers
static void setFramebufferSamplers(net.minecraft.client.renderer.ShaderInstance instance, AdvancedFbo framebuffer) SetsDiffuseSampler0-DiffuseSamplerMaxto the color buffers in the specified framebuffer.
Also setsDiffuseDepthSamplerif the framebuffer has a depth attachment.- Parameters:
framebuffer- The framebuffer to bind samplers from
-