TheDeathlyCow / frostiful

A Vanilla+ Snow & Frost Update Survival Experience for Minecraft
GNU Lesser General Public License v3.0
16 stars 8 forks source link

Hand does not shake w/Shaders #86

Open Exokyhh opened 5 months ago

Exokyhh commented 5 months ago

Describe the bug When shaders are enabled, the hand does not shake when freezing.

To Reproduce Steps to reproduce the behavior:

  1. Install and turn shaders on (I used complementary shaders)
  2. Go in a cold biome and start freezing
  3. When the player starts shaking, check your hand

Expected behavior The player hand to shake, the same as when shaders are turned off

Game information (please complete)

Logs Not needed.

Additional context None

TheDeathlyCow commented 4 months ago

Thanks for the report!

From my initial investigation, I can confirm that Iris does indeed seem to replace the item hand renderer with something of its own, causing Frostiful shaking to not appear to have an effect in game. The Fabric Rendering API does not seem to have a hand render event callback so I will probably have to homebrew a patch for this (or maybe I'll PR Fabric API with a new event).

TheDeathlyCow commented 4 months ago

Personal notes for future me:

This is the conflicting mixin in iris: https://github.com/IrisShaders/Iris/blob/eb8042f780d6574731a53645665c5335a5e1c39f/src/main/java/net/irisshaders/iris/mixin/MixinGameRenderer.java#L451C1-L459C3

I don't see a way in the Iris API to re-add my hand callback.

Also tried using the WorldRenderEvents.END, but that didn't work (probably because the matrix stack is reset before the hand is rendered?)