Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compatibility] Dynamic shell texturing doesn't work with Iris #25

Closed
masonjmj opened this issue Mar 16, 2022 · 10 comments
Closed

[Compatibility] Dynamic shell texturing doesn't work with Iris #25

masonjmj opened this issue Mar 16, 2022 · 10 comments

Comments

@masonjmj
Copy link

What happened?

When using a shader with Iris, the white shell building animation in the shell constructor is invisible.
It appears if the shader is disabled in the Iris settings.

2022-03-16_22 02 24
2022-03-16_22 02 37
.

Version

3.1

Minecraft Version

1.18.1

Fabric API Version

0.46.6+1.18

Installation Source

CurseForge

Logs

[22:00:05] [main/INFO]: Loading Minecraft 1.18.1 with Fabric Loader 0.13.3
[22:00:06] [ForkJoinPool-1-worker-5/WARN]: The mod "sync" contains invalid entries in its mod json:
- Unsupported root entry "includes" at line 50 column 13
[22:00:06] [main/INFO]: Loading 60 mods:
	- cloth-basic-math 0.6.0 via cloth-config
	- cloth-config 6.1.48 via sync
	- crowdin-translate 1.4+1.18 via sync
	- fabric 0.46.6+1.18
	- fabric-api-base 0.4.2+d7c144a865 via fabric
	- fabric-api-lookup-api-v1 1.5.3+d7c144a865 via fabric
	- fabric-biome-api-v1 6.0.2+d7c144a865 via fabric
	- fabric-blockrenderlayer-v1 1.1.10+3ac43d9565 via fabric
	- fabric-command-api-v1 1.1.7+d7c144a865 via fabric
	- fabric-commands-v0 0.2.6+b4f4f6cd65 via fabric
	- fabric-containers-v0 0.1.19+d7c144a865 via fabric
	- fabric-content-registries-v0 0.4.9+d7c144a865 via fabric
	- fabric-crash-report-info-v1 0.1.9+3ac43d9565 via fabric
	- fabric-dimensions-v1 2.1.10+a1d9bbf565 via fabric
	- fabric-entity-events-v1 1.4.6+d7c144a865 via fabric
	- fabric-events-interaction-v0 0.4.17+d7c144a865 via fabric
	- fabric-events-lifecycle-v0 0.2.9+d7c144a865 via fabric
	- fabric-game-rule-api-v1 1.0.11+d7c144a865 via fabric
	- fabric-item-api-v1 1.3.1+691a79b565 via fabric
	- fabric-item-groups-v0 0.3.7+3ac43d9565 via fabric
	- fabric-key-binding-api-v1 1.0.9+d7c144a865 via fabric
	- fabric-keybindings-v0 0.2.7+b4f4f6cd65 via fabric
	- fabric-lifecycle-events-v1 1.4.13+713c266865 via fabric
	- fabric-loot-tables-v1 1.0.9+d7c144a865 via fabric
	- fabric-mining-level-api-v1 1.0.7+d7c144a865 via fabric
	- fabric-mining-levels-v0 0.1.12+b4f4f6cd65 via fabric
	- fabric-models-v0 0.3.4+d7c144a865 via fabric
	- fabric-networking-api-v1 1.0.19+d7c144a865 via fabric
	- fabric-networking-v0 0.3.6+b4f4f6cd65 via fabric
	- fabric-object-builder-api-v1 1.11.5+737332ce65 via fabric
	- fabric-object-builders-v0 0.7.13+d7c144a865 via fabric
	- fabric-particles-v1 0.2.10+526dc1ac65 via fabric
	- fabric-registry-sync-v0 0.9.2+ad01bfbd65 via fabric
	- fabric-renderer-api-v1 0.4.11+b0b66fc365 via fabric
	- fabric-renderer-indigo 0.4.15+6825030165 via fabric
	- fabric-renderer-registries-v1 3.2.10+b4f4f6cd65 via fabric
	- fabric-rendering-data-attachment-v1 0.3.5+d7c144a865 via fabric
	- fabric-rendering-fluids-v1 0.1.19+3ac43d9565 via fabric
	- fabric-rendering-v0 1.1.12+b4f4f6cd65 via fabric
	- fabric-rendering-v1 1.10.6+713c266865 via fabric
	- fabric-resource-conditions-api-v1 1.0.2+d7c144a865 via fabric
	- fabric-resource-loader-v0 0.4.15+8906aafd65 via fabric
	- fabric-screen-api-v1 1.0.8+d7c144a865 via fabric
	- fabric-screen-handler-api-v1 1.1.12+d7c144a865 via fabric
	- fabric-structure-api-v1 2.1.3+d7c144a865 via fabric
	- fabric-tag-extensions-v0 1.2.9+d7c144a865 via fabric
	- fabric-textures-v0 1.0.10+3ac43d9565 via fabric
	- fabric-tool-attribute-api-v1 1.3.9+fb3b57b465 via fabric
	- fabric-transfer-api-v1 1.5.10+c329913d65 via fabric
	- fabricloader 0.13.3
	- iris 1.2.0-pre
	- java 17
	- minecraft 1.18.1
	- org_anarres_jcpp 1.4.14 via iris
	- org_joml_joml 1.10.2 via sodium
	- org_slf4j_slf4j-api 1.7.12 via iris
	- smart-recipes 0.2.0+1.18 via sync
	- sodium 0.4.0-alpha6+build.14
	- sync 3.1
	- team_reborn_energy 2.0.0-beta1 via sync
[22:00:06] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/C:/Users/mason/AppData/Roaming/.minecraft/libraries/net/fabricmc/sponge-mixin/0.11.2+mixin.0.8.5/sponge-mixin-0.11.2+mixin.0.8.5.jar Service=Knot/Fabric Env=CLIENT
[22:00:06] [main/INFO]: Compatibility level set to JAVA_16
[22:00:06] [main/INFO]: Compatibility level set to JAVA_17
[22:00:06] [main/INFO]: Loaded configuration file for Sodium: 29 options available, 1 override(s) found
[22:00:07] [main/WARN]: Force-disabling mixin 'features.sky.MixinWorldRenderer' as rule 'mixin.features.sky' (added by mods [iris]) disables it and children
[22:00:07] [main/INFO]: Trying to switch memory allocators to work around memory leaks present with Jemalloc 5.0.0 through 5.2.0 on Windows
[22:00:11] [main/WARN]: @Inject(@At("INVOKE")) Shift.BY=3 on fabric-lifecycle-events-v1.mixins.json:client.WorldChunkMixin::handler$zdh000$onLoadBlockEntity exceeds the maximum allowed value: 0. Increase the value of maxShiftBy to suppress this warning.
[22:00:13] [Render thread/WARN]: Method overwrite conflict for method_22920 in sodium.mixins.json:features.buffer_builder.intrinsics.MixinBufferBuilder, previously written by net.coderbot.iris.mixin.vertices.block_rendering.MixinBufferBuilder_SeparateAo. Skipping method.
[22:00:13] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[22:00:14] [Render thread/INFO]: Setting user: Masonjmj
[22:00:15] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 build 10
[22:00:17] [Render thread/INFO]: Profile: Custom (+3 options changed by user)
[22:00:19] [Render thread/INFO]: Using shaderpack: ComplementaryShaders_v4.3.3.zip
[22:00:20] [Render thread/INFO]: Hardware information:
[22:00:20] [Render thread/INFO]: CPU: 16x AMD Ryzen 7 2700X Eight-Core Processor 
[22:00:20] [Render thread/INFO]: GPU: NVIDIA GeForce GTX 1080/PCIe/SSE2 (Supports OpenGL 3.2.0 NVIDIA 511.79)
[22:00:20] [Render thread/INFO]: OS: Windows 10 (10.0)
[22:00:20] [Render thread/WARN]: Method overwrite conflict for getNativeMemoryUsage in sodium.mixins.json:features.debug.MixinDebugHud, previously written by net.coderbot.iris.mixin.MixinDebugScreenOverlay. Skipping method.
[22:00:21] [Render thread/INFO]: Narrator library for x64 successfully loaded
[22:00:21] [Render thread/INFO]: Reloading ResourceManager: Default, Fabric Mods (Cloth Config v6, Fabric API, Fabric API Base, Fabric API Lookup API (v1), Fabric Biome API (v1), Fabric BlockRenderLayer Registration (v1), Fabric Command API (v1), Fabric Commands (v0), Fabric Containers (v0), Fabric Content Registries (v0), Fabric Crash Report Info (v1), Fabric Dimensions API (v1), Fabric Entity Events (v1), Fabric Events Interaction (v0), Fabric Events Lifecycle (v0), Fabric Game Rule API (v1), Fabric Item API (v1), Fabric Item Groups (v0), Fabric Key Binding API (v1), Fabric Key Bindings (v0), Fabric Lifecycle Events (v1), Fabric Loot Tables (v1), Fabric Mining Level API (v1), Fabric Mining Levels (v0), Fabric Models (v0), Fabric Networking API (v1), Fabric Networking (v0), Fabric Object Builder API (v1), Fabric Object Builders (v0), Fabric Particles (v1), Fabric Registry Sync (v0), Fabric Renderer API (v1), Fabric Renderer - Indigo, Fabric Renderer Registries (v1), Fabric Rendering Data Attachment (v1), Fabric Rendering Fluids (v1), Fabric Rendering (v0), Fabric Rendering (v1), Fabric Resource Conditions API (v1), Fabric Resource Loader (v0), Fabric Screen API (v1), Fabric Screen Handler API (v1), Fabric Structure API (v1), Fabric Tag Extensions (v0), Fabric Textures (v0), Fabric Tool Attribute API (v1), Fabric Transfer API (v1), Fabric Loader, Iris, Smart Recipes, Sodium, Sync (Fabric), Energy)
[22:00:21] [Render thread/INFO]: [STDOUT]: Inject generated resource packs.
[22:00:26] [Render thread/INFO]: OpenAL initialized on device OpenAL Soft on Headphones (Arctis 7 Game)
[22:00:26] [Render thread/INFO]: Sound engine started
[22:00:26] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/blocks.png-atlas
[22:00:26] [Render thread/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[22:00:26] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[22:00:26] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[22:00:26] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[22:00:26] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[22:00:26] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[22:00:27] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[22:00:27] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[22:00:27] [Render thread/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[22:00:56] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[22:00:56] [Render thread/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[22:00:56] [Render thread/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[22:00:56] [Render thread/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[22:00:56] [Render thread/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[22:00:56] [Render thread/INFO]: Reloading ResourceManager: Default, Fabric Mods (Fabric Tool Attribute API (v1), Sync (Fabric))
[22:00:56] [Render thread/INFO]: Skipped 0 recipes
[22:00:56] [Render thread/INFO]: Loaded 7 recipes
[22:00:56] [Render thread/INFO]: Loaded 1141 advancements
[22:00:57] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[22:00:57] [Server thread/INFO]: Starting integrated minecraft server version 1.18.1
[22:00:57] [Server thread/INFO]: Generating keypair
[22:01:00] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[22:01:01] [Render thread/INFO]: Preparing spawn area: 0%
[22:01:01] [Render thread/INFO]: Preparing spawn area: 0%
[22:01:01] [Render thread/INFO]: Preparing spawn area: 0%
[22:01:02] [Render thread/INFO]: Preparing spawn area: 0%
[22:01:02] [Render thread/INFO]: Preparing spawn area: 2%
[22:01:03] [Render thread/INFO]: Preparing spawn area: 4%
[22:01:03] [Render thread/INFO]: Preparing spawn area: 7%
[22:01:04] [Render thread/INFO]: Preparing spawn area: 11%
[22:01:05] [Render thread/INFO]: Preparing spawn area: 13%
[22:01:05] [Render thread/INFO]: Preparing spawn area: 15%
[22:01:05] [Render thread/INFO]: Preparing spawn area: 20%
[22:01:06] [Render thread/INFO]: Preparing spawn area: 24%
[22:01:06] [Render thread/INFO]: Preparing spawn area: 28%
[22:01:07] [Render thread/INFO]: Preparing spawn area: 33%
[22:01:07] [Render thread/INFO]: Preparing spawn area: 37%
[22:01:08] [Render thread/INFO]: Preparing spawn area: 42%
[22:01:09] [Render thread/INFO]: Preparing spawn area: 47%
[22:01:09] [Render thread/INFO]: Preparing spawn area: 51%
[22:01:09] [Render thread/INFO]: Preparing spawn area: 55%
[22:01:10] [Render thread/INFO]: Preparing spawn area: 59%
[22:01:10] [Render thread/INFO]: Preparing spawn area: 64%
[22:01:11] [Render thread/INFO]: Preparing spawn area: 68%
[22:01:11] [Render thread/INFO]: Preparing spawn area: 72%
[22:01:12] [Render thread/INFO]: Preparing spawn area: 74%
[22:01:12] [Render thread/INFO]: Preparing spawn area: 80%
[22:01:13] [Render thread/INFO]: Preparing spawn area: 83%
[22:01:13] [Render thread/INFO]: Preparing spawn area: 87%
[22:01:14] [Render thread/INFO]: Preparing spawn area: 90%
[22:01:14] [Render thread/INFO]: Preparing spawn area: 95%
[22:01:15] [Render thread/INFO]: Time elapsed: 14384 ms
[22:01:15] [Server thread/INFO]: Reloaded 1 recipes (removed: 1 | added: 0) on the 'minecraft:end_data_pack_reload' event
[22:01:15] [Server thread/INFO]: Changing view distance to 24, from 10
[22:01:15] [Server thread/INFO]: Changing simulation distance to 12, from 0
[22:01:16] [Server thread/INFO]: Masonjmj[local:E:b695c97e] logged in with entity id 100 at (-585.5, 73.0, -205.5)
[22:01:16] [Server thread/INFO]: Masonjmj joined the game
[22:01:16] [Render thread/INFO]: Started 10 worker threads
[22:01:16] [Render thread/INFO]: Loaded 0 advancements
[22:01:17] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD
[22:01:17] [Render thread/WARN]: [deferred1] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [composite] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [Triforce Patcher] gl_FragColor is not supported yet, please use gl_FragData! Assuming that the shaderpack author intended to use gl_FragData[0]...
[22:01:17] [Render thread/WARN]: [textured] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [textured_color] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [sky_basic] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [sky_basic_color] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [sky_textured] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [sky_textured_color] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [terrain_translucent] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/WARN]: [particles] Unsupported uniform: float isEyeInCave
[22:01:17] [Render thread/INFO]: Stopping worker threads
[22:01:17] [Render thread/INFO]: Started 10 worker threads
[22:01:17] [Render thread/WARN]: [<sodium shaders>] Unsupported uniform: float isEyeInCave
[22:01:48] [Server thread/INFO]: [Masonjmj: Set own game mode to Survival Mode]
[22:01:48] [Render thread/INFO]: [CHAT] Set own game mode to Survival Mode
[22:01:55] [Render thread/INFO]: [CHAT] Unknown item 'minecraft:enchan'
[22:01:55] [Render thread/INFO]: [CHAT] ... Masonjmj enchan<--[HERE]
[22:01:58] [Server thread/INFO]: [Masonjmj: Gave 1 [Enchanted Golden Apple] to Masonjmj]
[22:01:58] [Render thread/INFO]: [CHAT] Gave 1 [Enchanted Golden Apple] to Masonjmj
[22:01:58] [Render thread/INFO]: Loaded 2 advancements
[22:02:01] [Render thread/INFO]: Loaded 17 advancements
[22:02:05] [Server thread/INFO]: [Masonjmj: Set own game mode to Creative Mode]
[22:02:05] [Render thread/INFO]: [CHAT] Set own game mode to Creative Mode
[22:02:18] [Server thread/INFO]: Saving and pausing game...
[22:02:18] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:overworld
[22:02:18] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_nether
[22:02:18] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_end
[22:02:23] [Render thread/INFO]: [CHAT] Saved screenshot as 2022-03-16_22.02.23.png
[22:02:25] [Render thread/INFO]: [CHAT] Saved screenshot as 2022-03-16_22.02.24.png
[22:02:27] [Server thread/INFO]: Saving and pausing game...
[22:02:27] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:overworld
[22:02:27] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_nether
[22:02:27] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_end
[22:02:34] [Render thread/INFO]: Destroying pipeline OVERWORLD
[22:02:34] [Render thread/INFO]: Shaders are disabled because enableShaders is set to false in iris.properties
[22:02:34] [Render thread/INFO]: Shaders are disabled
[22:02:34] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD
[22:02:34] [Render thread/INFO]: Stopping worker threads
[22:02:34] [Render thread/INFO]: Started 10 worker threads
[22:02:35] [Render thread/INFO]: Destroying pipeline OVERWORLD
[22:02:35] [Render thread/INFO]: Shaders are disabled because enableShaders is set to false in iris.properties
[22:02:35] [Render thread/INFO]: Shaders are disabled
[22:02:35] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD
[22:02:38] [Render thread/INFO]: [CHAT] Saved screenshot as 2022-03-16_22.02.37.png
[22:02:39] [Render thread/INFO]: [CHAT] Saved screenshot as 2022-03-16_22.02.39.png
[22:02:42] [Server thread/INFO]: Saving and pausing game...
[22:02:42] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:overworld
[22:02:42] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_nether
[22:02:42] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_end
[22:02:46] [Server thread/INFO]: Masonjmj lost connection: Disconnected
[22:02:46] [Server thread/INFO]: Masonjmj left the game
[22:02:46] [Server thread/INFO]: Stopping singleplayer server as player logged out
[22:02:46] [Server thread/INFO]: Stopping server
[22:02:46] [Server thread/INFO]: Saving players
[22:02:46] [Server thread/INFO]: Saving worlds
[22:02:46] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:overworld
[22:02:46] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_nether
[22:02:46] [Server thread/INFO]: Saving chunks for level 'ServerLevel[Sync test]'/minecraft:the_end
[22:02:46] [Server thread/INFO]: ThreadedAnvilChunkStorage (Sync test): All chunks are saved
[22:02:46] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[22:02:46] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[22:02:46] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[22:02:47] [Render thread/INFO]: Stopping worker threads
[22:02:48] [Render thread/INFO]: Stopping!

Other Mods

iris-mc1.18.1-1.2.0-pre
sodium-fabric-mc1.18.1-0.4.0-alpha6+build.14

Additional Information

No response

@masonjmj masonjmj added the bug Something isn't working label Mar 16, 2022
@Kir-Antipov
Copy link
Owner

Does it happen with every shader you're using?

@masonjmj
Copy link
Author

I tested it with both Complementary Shaders and Sildur's Vibrant Shaders Extreme, and it occurred with both of those.

@Kir-Antipov
Copy link
Owner

Got it. Will look into this when the war ends

@Kir-Antipov
Copy link
Owner

It's better now... kind of. At least you can see that something's inside.

image

Sadly, there's just no way of "combining" two shader programs because of the way they work, therefore it's the best outcome I can provide you with at the moment. Leaving this issue open, because it's not really resolved and maybe I will come up with some hack, but no promises

@Kir-Antipov Kir-Antipov removed the bug Something isn't working label Jun 1, 2022
@masonjmj
Copy link
Author

masonjmj commented Jun 1, 2022

Thanks for working on it. I've never specifically worked with fabric mods before, so I'm not sure how relevant it would be, but I know there's a mod called "indium" which allows sodium and thus iris to be compatible with the "fabric rendering api". I know there's a few mods that use that for complicated models, but I have absolutely no idea if it would be relevant here, and even if it is I'm sure it would probably be a lot of work to implement, but maybe it's useful. Thanks again.

@Kir-Antipov
Copy link
Owner

I know about all these, don't worry :) The issue is not really about one rendering api being incompatible with another, it's much worse - the concepts themselves cannot coexist with each other, therefore implementations of those concepts doesn't matter.

I use core shaders to render unconventional things like shell's building blocks or partially colored shells. Core shaders are part of the vanilla rendering pipeline nowadays, so this approach is compatible with almost all mods, except mods that provide shaders themselves, because it is physically impossible to combine two shaders automatically (in order to make things simple, you can treat a shader as a function that takes vertices and other stuff and returns actual colors that should be rendered - (vertices: Vertex[], ...args: any[]): Color[]). As you can clearly see, you cannot chain two or more shaders).

Therefore, the only possible solution is to completely scrap current rendering implementation out and implement it in some other way, at least when Iris is loaded.

@masonjmj
Copy link
Author

masonjmj commented Jun 2, 2022

Ah okay, I get it. Thanks again for your work on it.

@Kir-Antipov
Copy link
Owner

Notes to self:

  • When Iris is loaded, render small white concrete blocks instead of voxels. Inefficient? Yep, but at least this should work.
  • When Iris is loaded, render partially colored model as fully colored and apply a dynamically generated overlay to it. Once again, it's inefficient, but may work

@Kir-Antipov
Copy link
Owner

Concrete blocks to the win

image

And now to the hard part...

Kir-Antipov added a commit that referenced this issue Jun 10, 2022
@Kir-Antipov Kir-Antipov changed the title [Bug] Shader problem [Compatibility] Dynamic shell texturing does not work when Iris is present Jun 10, 2022
@Kir-Antipov
Copy link
Owner

Sadly, it's physically impossible to make dynamic shell texturing (the last phase of the shell building process) work with Iris the same way as it does now. The best solution I can think of is render a player skin and then render a white overlay over it where it's needed - this way we lose smooth "subpixel" rendering, but "incremental" texturing is still better than nothing.

Unfortunately, I was unable to figure out a way to bring my idea to life, because nowadays when you try to do something with OpenGL the answer is always "just use shaders" (which is, as said before, not possible with Iris onboard), and older and clumsier approaches just do not exist anymore, so I'm stuck with seemingly easy task of dynamically merging two textures because of all the limitations.

Therefore, for this part Iris players will see a fully rendered skin from start. It's better than seeing nothing, right?

I'm closing the issue at the moment, and moving it to the Known Issues section.

For anyone who has a desire to help and deep knowledge of Minecraft rendering pipeline and how Iris affects it, please, refer to this code:

VertexConsumer baseConsumer = vertexConsumers.getBuffer(baseLayer);
ShellEntity shell = (ShellEntity)player;
float progress = shell.getState().getProgress();
if (!(progress >= ShellState.PROGRESS_PRINTING && progress < ShellState.PROGRESS_DONE)) {
return baseConsumer;
}
Identifier[] textures = GeneratedTextureManager.getTextures(TextureGenerators.PlayerEntityPartiallyTexturedTextureGenerator);
if (textures.length == 0) {
return baseConsumer;
}
float printingProgress = (progress - ShellState.PROGRESS_PRINTING) / (ShellState.PROGRESS_PAINTING);
RenderLayer printingMaskLayer = IrisRenderLayer.getPrintingMask(textures[(int)(textures.length * printingProgress)]);
// TODO
// Fix dev.kir.sync.compat.iris.IrisRenderLayer::getPrintingMask,
// and then fix combining baseConsumer with printingMaskVertexConsumer
VertexConsumer printingMaskVertexConsumer = vertexConsumers.getBuffer(printingMaskLayer);
if (printingMaskVertexConsumer == baseConsumer) {
return vertexConsumers.getBuffer(baseLayer);
}
return VertexConsumers.union(printingMaskVertexConsumer, baseConsumer);

  • baseLayer is RenderLayer.getEntityTranslucent(playerSkin)
  • textures is an array of dynamically generated player skins partially filled with white. This way textures[(int)(textures.length * printingProgress)] will give you a "printing mask" that can be combined with fully colored player skin in order to achieve a similar result to original texturing process

@Kir-Antipov Kir-Antipov pinned this issue Jun 10, 2022
@Kir-Antipov Kir-Antipov changed the title [Compatibility] Dynamic shell texturing does not work when Iris is present [Compatibility] Dynamic shell texturing doesn't work with Iris Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants