logo
banner
Rating
Voted0

Satin API Mod (1.20.4) - Help modders use shaders.

0
Mod version:1
Game version:1.20.4
The mod has been successfully tested for the absence of viruses
6321.22K223.01K
image

Minecraft

Report mod

  • image
modalImage

About This Mod

Satin API Mod (1.20.4) is a simple library that allows modders to add interesting graphical effects to their mods. Its main function is to greatly simplify the use of Minecraft's data-driven shader system (as in Super Secret Settings, Mob Vision and Spectral Arrow). It is a lightweight library for using OpenGL shaders, and is intended to be used by modders to add interesting graphical effects to their mods.< /p>

Features

Changes from vanilla

A simple installation of Satin changes the game in several ways, mostly related to ShaderEffects

Uniform fixes: using integer vectors as a uniform causes copy-paste to not work and crashes the game in Vanilla; Satin redirects the call to load the correct buffer.

Shader Layout: A fix has been made to the shader processor to accept a resource domain with the program name and fragment/vertex shader file specification.

Readable depth: Satin provided access to depth textures in the framebuffer before it was cool (deprecated in 1.16).

Satin does not install shaders in the GameRenderer unless the mod has registered a PickEntityShaderCallback.

Shader Management

The main function of Satin is the management of shader effects.

ShaderEffect is a Minecraft class that implements data-driven shaders with post-processing, but there are a few caveats. First, these shader effects are initialized immediately at build time, but they should be initialized after the game has finished loading to avoid gl errors. Secondly, they need to be updated every time the game resolution changes. Finally, there is no way to define the shape from external code.

Satin manages shader effects for you and provides you with a ManagedShaderEffect object. This shader effect can be initialized manually at any time, but it is easy to initialize. Initialized shader effects are automatically reloaded when the game resolution changes and when resources are reloaded. There are also several accessor methods for dynamically setting the shape.

Render Layer Utilities

The ManagedFramebuffer and ManagedShaderProgram classes have methods for obtaining a clone of an existing RenderLayer object. This target allows drawing to the ManagedFramebuffer in the first case and to the shader program in the second. This can be used, in particular, to render custom effects on entities and blocks.

Regular blocks do not support custom rendering layers. When using advanced shader materials, you should consider using an alternative renderer such as Canvas.

Shader Utilities

Satin has several utility classes and methods to make working with shaders easier, not just ShaderEffect: ShaderLoader provides the ability to load, create, and link OpenGL shader programs in a single method call, and ShaderLoader provides the ability to load, create, and link OpenGL shader programs in a single method call, GlPrograms provides helper methods for working with these programs, and the matrix package helps obtain matrices and manipulate them.

Similar Mods/Addons

Game Version *

1.20.4 (f3de97fa6e5c163c351bb0ecbdc06c6e.jar)