Iris Shaders

Iris Shaders

36M Downloads

1.17+ OptiFine uniform and attribute support

Luracasmus opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.
Iris currently does not seem to support the 1.17+ uniforms and attributes added by OptiFine:

Source  Value
uniform mat4 modelViewMatrix; model view matrix
uniform mat4 modelViewMatrixInverse; modelViewMatrixInverse
uniform mat4 projectionMatrix; projectionMatrix
uniform mat4 projectionMatrixInverse; projectionMatrixInverse
uniform mat4 textureMatrix = mat4(1.0); textureMatrix = mat4(1.0)
uniform mat3 normalMatrix; normal matrix
uniform vec3 chunkOffset; terrain chunk origin, used with attribute vaPosition
uniform float alphaTestRef; alpha test reference value, the check is if (color.a < alphaTestRef) discard;
uniform float darknessFactor strength of the darkness effect (0.0-1.0)
uniform float darknessLightFactor lightmap variations caused by the darkness effect (0.0-1.0)

https://optifine.readthedocs.io/shaders/uniforms.html#:~:text=J.%20Render%20stages-,1.17%2B%20Options%20Below,-uniform%20mat4%20modelViewMatrix

Source  Value  Comment
in vec3 vaPosition; position (x, y, z) 1.17+, for terrain it is relative to the chunk origin, see "chunkOffset"
in vec4 vaColor; color (r, g, b, a) 1.17+
in vec2 vaUV0; texture (u, v) 1.17+
in ivec2 vaUV1; overlay (u, v) 1.17+
in ivec2 vaUV2; lightmap (u, v) 1.17+
in vec3 vaNormal; normal (x, y, z) 1.17+

https://github.com/sp614x/optifine/blob/master/OptiFineDoc/doc/shaders.txt#:~:text=wolf%20collar%2C%20etc.-,Attributes,-%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D

Describe the solution you'd like
Add support for the new uniforms and attributes in Iris

Describe alternatives you've considered
There are some older alternatives (gl_MultiTexCoord0, ftransform, etc.)

commented

This is supported, but is currently unstable.