Oculus

Oculus

48M Downloads

Mahou Tsukai various issues

stepsword opened this issue ยท 4 comments

commented

What happened?

Hi, I'm the Mahou Tsukai Dev. It's been reported to me a few times that a bunch of stuff is not rendering when shaders are on with Oculus.

I was able to confirm this by installing Oculus & Rubidium along with Mahou Tsukai on 1.18.2, and dropping Complementary Shaders into it.

Basically from my testing I've noticed that any BlockEntityWithoutLevelRenderer (read: special item renderers) I use do not render at all (in world - they render fine in the inventory). I've included a screenshot comparison below.

Typically these BlockEntityWithoutLevelRenderers have two parts for my items - first, I grab the BakedModel

mc.getModelManager().getModel(rl)

then I set the shaders

RenderSystem.setShader(()-> ModShaders.FULLBRIGHT_QUADS);
RenderSystem.setShaderColor(0,0,1,1);

then I render the model using a call to one of vanillas item render functions

Minecraft.getInstance().getItemRenderer().renderQuadList(matrixStackIn, bufferIn, modelIn.getQuads((BlockState)null, (Direction)null, random), stack, combinedLightIn, combinedOverlayIn);

Then, after rendering the baked model, I usually have some sort of special effect on the item, like magic circles etc. These are done with normal RenderType and VertexConsumer rendering, sometimes using a custom shader but most of the time just using GameRenderer::getPositionColorTexLightmapShader.

Neither the special effects on items nor the items themselves actually render, though the method does run normally as I've confirmed in a debugger.

Furthemore, rendering I do in BlockEntityRenderer for the most part also does not work. I have only 3 blocks or so, but the "special" parts of them which are typically QUADS or TRIANGLE_STRIP renders, don't render at all.

Interestingly, though, the exception seems to be my LINES render type, which does render with shaders on (though the rest of the block does not. I've tried messing with each setting of the rendertype individually though, and have not had any success in getting it the inside to render, even incorrectly. I've uploaded pictures of this as well.

Any ideas on if theres anything I can do to make these things compatible and render with Oculus Shaders? Things that I render in RenderWorldLastEvent actually work mostly fine, including a fog particle I have with custom shaders on it, which is pretty amazing since Optifine's default is usually to just crash when I try to use custom shaders.

I can share my RenderTypes if you think it'd be helpful? But even for rendering vanilla item models (added with ForgeModelBakery.addSpecialModel), I'm using a vanilla one which I would have expected to work if it were an issue with that.

        RenderType rendertype = ItemBlockRenderTypes.getRenderType(stack, false);

Also is glFragColor an issue if it's one of my mod's shaders? I couldn't tell if the log was talking to the shaderpack or me, lol. That said, I'm using vanilla's shaders for some of these, and those parts still aren't rendering, so it's probably not that.. right?

Screenshots

2022-06-18_18 54 06
2022-06-18_18 54 34
2022-06-18_19 42 20
2022-06-18_19 42 32

Relevant log output

[18Jun2022 19:35:52.723] [Render thread/WARN] [Oculus/]: [Triforce Patcher] gl_FragColor is not supported yet, please use gl_FragData! Assuming that the shaderpack author intended to use gl_FragData[0]...
[18Jun2022 19:35:52.969] [Render thread/INFO] [net.minecraft.client.gui.components.ChatComponent/]: [CHAT] Shaders Reloaded!

Minecraft Version

Minecraft 1.18.2

Iris Version

Oculus mc1.18.2-1.2.5

Sodium Version

Rubidium mc1.18.2-0.5.2a

Operating System

Windows 10

What is your GPU?

Nvidia GeForce GTX 1070

Java Version

Java 17

Additional context

No response

commented

Ok, so obviously this issue is not related to Mahou Tsukai. I already heard about similar issues before, maybe it will be fixed in the next release

commented

thanks! let me know if i can give any more information that might help track it down

commented

@Asek3 there is

Ok, so obviously this issue is not related to Mahou Tsukai. I already heard about similar issues before, maybe it will be fixed in the next release

It's 1 year since this issue has been reported, there is any news about the status of this issue?

commented

Seeing that is is still open, is it safe to assume that the problem is still apparent? I know with shaders i can see some weapons and other items but some of the spells don't appear.