"if" custom uniform function does not work properly on vectors
McArdellje opened this issue ยท 3 comments
What happened?
any if() call that is of the signature if(bool, vecN, vecN)
will cause a warning "Failed to resolve uniform NAME, reason: Ambiguity", this is because the code in parsing/IrisFunctions.java that is supposed to handle varargs (such as if(bool, vecN, bool, vecN, vecN)
) due to it just being a copy of the non-vararg code for vector if
s therefore it adds many duplicate function calls for if with the same signature of if(bool, vecN, vecN)
Screenshots
No response
Log output
(only relevant parts of the logs posted)
[20:59:57] [main/INFO]: Loading 15 mods:
Index | Mod | ID | Version | Type | File Hash (SHA-1) | File(s) | Sub-File |
---|---|---|---|---|---|---|---|
2 | antlr4-runtime | org_antlr_antlr4-runtime | 4.13.1 | Fabric | efe34a812754bd1d2f269544feba68c5b6988bf1 | \iris-1.7.1+mc1.21.jar | /META-INF/jars/antlr4-runtime-4.13.1.jar |
4 | Fabric API Base | fabric-api-base | 0.4.42+6573ed8c90 | Fabric | 04efdf134daa2f24d0a1f9e61c1bdc0b7ffecf0c | \sodium-fabric-0.5.9+mc1.21.jar | /META-INF/jars/fabric-api-base-0.4.42+6573ed8c90.jar |
9 | Fabric BlockView API (v2) | fabric-block-view-api-v2 | 1.0.10+6573ed8c90 | Fabric | 04efdf134daa2f24d0a1f9e61c1bdc0b7ffecf0c | \sodium-fabric-0.5.9+mc1.21.jar | /META-INF/jars/fabric-block-view-api-v2-1.0.10+6573ed8c90.jar |
12 | Fabric Key Binding API (v1) | fabric-key-binding-api-v1 | 1.0.47+0af3f5a790 | Fabric | efe34a812754bd1d2f269544feba68c5b6988bf1 | \iris-1.7.1+mc1.21.jar | /META-INF/jars/fabric-key-binding-api-v1-1.0.47+0af3f5a790.jar |
13 | Fabric Rendering Data Attachment (v1) | fabric-rendering-data-attachment-v1 | 0.3.48+73761d2e90 | Fabric | 04efdf134daa2f24d0a1f9e61c1bdc0b7ffecf0c | \sodium-fabric-0.5.9+mc1.21.jar | /META-INF/jars/fabric-rendering-data-attachment-v1-0.3.48+73761d2e90.jar |
6 | Fabric Rendering Fluids (v1) | fabric-rendering-fluids-v1 | 3.1.6+b559734490 | Fabric | 04efdf134daa2f24d0a1f9e61c1bdc0b7ffecf0c | \sodium-fabric-0.5.9+mc1.21.jar | /META-INF/jars/fabric-rendering-fluids-v1-3.1.6+b559734490.jar |
14 | Fabric Resource Loader (v0) | fabric-resource-loader-v0 | 1.1.3+b559734490 | Fabric | 04efdf134daa2f24d0a1f9e61c1bdc0b7ffecf0c | \sodium-fabric-0.5.9+mc1.21.jar | /META-INF/jars/fabric-resource-loader-v0-1.1.3+b559734490.jar |
0 | glsl-transformer | io_github_douira_glsl-transformer | 2.0.1 | Fabric | efe34a812754bd1d2f269544feba68c5b6988bf1 | \iris-1.7.1+mc1.21.jar | /META-INF/jars/glsl-transformer-2.0.1.jar |
5 | Iris | iris | 1.7.1+mc1.21 | Fabric | efe34a812754bd1d2f269544feba68c5b6988bf1 | \iris-1.7.1+mc1.21.jar | |
1 | jcpp | org_anarres_jcpp | 1.4.14 | Fabric | efe34a812754bd1d2f269544feba68c5b6988bf1 | \iris-1.7.1+mc1.21.jar | /META-INF/jars/jcpp-1.4.14.jar |
7 | Minecraft | minecraft | 1.21 | Builtin | 4ce9b6d597562bafe73251676cefea534c354a75 | .cache\quilt_loader\remappedJars\minecraft-1.21-0.26.0\client-intermediary.jar | / |
4ce9b6d597562bafe73251676cefea534c354a75 | \AppData\Roaming\PrismLauncher\libraries\com\mojang\datafixerupper\8.0.16\datafixerupper-8.0.16.jar | / | |||||
4ce9b6d597562bafe73251676cefea534c354a75 | \AppData\Roaming\PrismLauncher\libraries\com\mojang\authlib\6.0.54\authlib-6.0.54.jar | / | |||||
\AppData\Roaming\PrismLauncher\libraries\com\mojang\brigadier\1.2.9\brigadier-1.2.9.jar | / | ||||||
3 | MixinExtras | mixinextras | 0.3.5 | Fabric | 3b577be20ea942610b3045e4f0cd909fa415a9d3 | \AppData\Roaming\PrismLauncher\libraries\org\quiltmc\quilt-loader\0.26.0\quilt-loader-0.26.0.jar | /META-INF/jars/mixinextras-fabric-0.3.5.jar |
8 | OpenJDK 64-Bit Server VM | java | 21 | Builtin | C:\Program Files\Eclipse Adoptium\jdk-21.0.3.9-hotspot | ||
10 | Quilt Loader | quilt_loader | 0.26.0 | Quilt | 3b577be20ea942610b3045e4f0cd909fa415a9d3 | \AppData\Roaming\PrismLauncher\libraries\org\quiltmc\quilt-loader\0.26.0\quilt-loader-0.26.0.jar | |
11 | Sodium | sodium | 0.5.9+mc1.21 | Fabric | 04efdf134daa2f24d0a1f9e61c1bdc0b7ffecf0c | \sodium-fabric-0.5.9+mc1.21.jar | |
------: | --------------------------------------- | ------------------------------------- | ------------------- | --------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
Mod Table Version: 2 | |||||||
Plugin Types: {quilted_fabric_loader=[Fabric], quilt_loader=[Quilt, Builtin]} |
Minecraft Version
1.21.0
Iris Version
iris-1.7.1+mc1.21.jar
Operating System
Windows 11
What is your GPU?
Nvidia GeForce GTX 1070
Additional context
[21:35:07] [Render thread/INFO]: Profile: Custom (+0 options changed by user)
[21:35:07] [Render thread/INFO]: Using shaderpack: mc_shader
[21:35:07] [Render thread/INFO]: Creating pipeline for dimension minecraft:the_nether
[21:35:07] [Render thread/WARN]: Failed to resolve uniform Light1_Direction, reason: Ambiguity,
old: vec3 (bool, vec3, vec3) (priority: 0, pure:yes)
new: vec3 (bool, vec3, vec3) (priority: 0, pure:yes) ( = FunctionCall{if {[FunctionCall{in {[Id{biome_category}, Number{16}]} }, FunctionCall{vec3 {[UnaryExpr{negate {Number{0.16169}} }, UnaryExpr{negate {Number{0.808452}} }, Number{0.565916}]} }, FunctionCall{vec3 {[UnaryExpr{negate {Number{0.16169}} }, Number{0.808452}, Number{0.565916}]} }]} })
java.lang.RuntimeException: Ambiguity,
old: vec3 (bool, vec3, vec3) (priority: 0, pure:yes)
new: vec3 (bool, vec3, vec3) (priority: 0, pure:yes)
at kroppeb.stareval.resolver.ExpressionResolver.resolveCallExpressionInternal(ExpressionResolver.java:89) ~[iris-1.7.1mc1.21.i0:0/:?]
at kroppeb.stareval.resolver.ExpressionResolver.resolveCallExpression(ExpressionResolver.java:140) ~[iris-1.7.1mc1.21.i0:0/:?]
at kroppeb.stareval.resolver.ExpressionResolver.resolveExpressionInternal(ExpressionResolver.java:194) ~[iris-1.7.1mc1.21.i0:0/:?]
at kroppeb.stareval.resolver.ExpressionResolver.resolveExpression(ExpressionResolver.java:50) ~[iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.uniforms.custom.CustomUniforms.(CustomUniforms.java:62) ~[iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.uniforms.custom.CustomUniforms$Builder.build(CustomUniforms.java:333) ~[iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.uniforms.custom.CustomUniforms$Builder.build(CustomUniforms.java:344) ~[iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.pipeline.IrisRenderingPipeline.(IrisRenderingPipeline.java:264) ~[iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.Iris.createPipeline(Iris.java:578) ~[iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.pipeline.PipelineManager.preparePipeline(PipelineManager.java:33) [iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.Iris.reload(Iris.java:529) [iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.Iris.toggleShaders(Iris.java:186) [iris-1.7.1mc1.21.i0:0/:?]
at net.irisshaders.iris.Iris.handleKeybinds(Iris.java:159) [iris-1.7.1mc1.21.i0:0/:?]
at net.minecraft.class_310.handler$zbh000$iris$onTick(class_310.java:3673) [transformed-mod-minecraft-v1.21.jar:?]
at net.minecraft.class_310.method_1574(class_310.java:2012) [transformed-mod-minecraft-v1.21.jar:?]
at net.minecraft.class_310.method_1523(class_310.java:1246) [transformed-mod-minecraft-v1.21.jar:?]
at net.minecraft.class_310.method_1514(class_310.java:882) [transformed-mod-minecraft-v1.21.jar:?]
at net.minecraft.client.main.Main.main(Main.java:256) [transformed-mod-minecraft-v1.21.jar:?]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:557) [quilt-loader-0.26.0.jar:?]
at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:84) [quilt-loader-0.26.0.jar:?]
at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28) [quilt-loader-0.26.0.jar:?]
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100) [NewLaunch.jar:?]
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) [NewLaunch.jar:?]
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) [NewLaunch.jar:?]