XCompWiz / LookingGlass

Extra-Dimensional Viewer API mod for Minecraft
Other
34 stars 8 forks source link

Shaders cause graphical issues #2

Open Draco18s opened 9 years ago

Draco18s commented 9 years ago

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1280070-mystcraft-0-11-0?comment=12777

Quote from Nnystyxx Not sure if this is the place to report LookingGlass issues, but using the GLSL shaders mod with LookingGlass and Mystcraft causes the latter's link panels to cover the entire screen when a book is opened. Not totally destructive, but distracting.

XCompWiz commented 9 years ago

I'd like a screenshot, if possible. Also, there are a lot of things at play here and I have no idea at all how the shaders mod does things. A screenshot might help me make an educated guess. Also fixed your quote. Sorry for editing.

Draco18s commented 9 years ago

Forwarded your request back to the thread, hopefully he'll supply one here.

nnystyxx commented 9 years ago

2015-05-18_16 21 23

This was an F2 screenshot of my whole screen. Turning to default shaders caused all panels to be black but still take the whole screen. This did not make the clickable area any bigger. Switching to a page without the link panel worked fine.

On Liteloader 1.7.10 with Forge 10.13.3.1403.

Mods:

Shader Used: KUDA Shaders v5.0.3. Ultra.

XCompWiz commented 9 years ago

Tagging @karyonix. Any thoughts? I'll try throwing this into my dev environment and testing different variations of the rendering to see what is causing it.

@nnystyxx Have you tested the /lg-viewdim command to see if it does the same?

nnystyxx commented 9 years ago

/lg-viewdim 0 caused, uh. . a very strange flickering bug and the inability to do anything else. I assume the rendering was just inescapable-- the game ran fine still. Testing that without shaders shortly. .

Yeah, having shaders causes a viewdim 'mirror' in the air to make the game FREAK OUT. I have no good way of making a video of it. Maybe gfycat.

AtomicBlom commented 9 years ago

I'd like to add that my logs were getting hammered by this same issue, here's a snippet: https://gist.github.com/AtomicBlom/7d2ce39e10086859be5d

Snowy-Fox commented 9 years ago

I'm having the exact same issue. Here's an example: https://dl.dropboxusercontent.com/u/55403585/2015-07-06_00.48.20.jpg

XCompWiz commented 9 years ago

Query: Does this happen only while the book is open, or forever after opening the book? Similarly, does it only happen while you can "see" the portal, or for as long as the portal is alive, regardless of if the portal is in your For?

Snowy-Fox commented 9 years ago

It's only when I'm looking in the Book. It disappears upon leaving the book GUI. I haven't seen it on any portals, as I've not seen any portals yet.

On Mon, Jul 13, 2015 at 2:51 AM, XCompWiz notifications@github.com wrote:

Query: Does this happen only while the book is open, or forever after opening the book? Similarly, does it only happen while you can "see" the portal, or for as long as the portal is alive, regardless of if the portal is in your For?

— Reply to this email directly or view it on GitHub https://github.com/XCompWiz/LookingGlass/issues/2#issuecomment-120782907 .

t2pellet commented 8 years ago

"/lg-viewdim 0 caused, uh. . a very strange flickering bug and the inability to do anything else. I assume the rendering was just inescapable-- the game ran fine still. Testing that without shaders shortly. ." Occurs to me as well. I have both shaders and optifine installed. Is optifine compatible?

XCompWiz commented 8 years ago

Is optifine compatible?

Almost never. :P

@Snowy-Fox I missed the reference you made before. Very funny. :D

I honestly don't know what to do with this one. It's hard enough to warp the Minecraft renderer to support rendering others worlds to texture. Getting that to work with shaders and other mods playing with the render pipeline sounds pretty hairy. Minecraft's render pipeline, as of 1.7.10, isn't exactly well thought out. I've heard it improved markedly in 1.8. Maybe this will smooth out in a few updates. :P

If anyone can provide more info or aid it is most welcome.

sp614x commented 7 years ago

Probably LookingGlass is trying to render the other world view while rendering the item (book). This is definitely not possible with shaders as they use a lot of static state.

Alternative views can only be rendered outside of EntityRenderer.renderWorld() or even better outside of EntityRenderer.updateCameraAndRender().

The ScreenShotHelper uses this code to create a scaled world view:

            int mul = Config.getScreenshotSize();
            boolean resize = (OpenGlHelper.isFramebufferEnabled() && mul > 1);
            if(resize)
            {
              // Gui scale
              Config.getGameSettings().guiScale = guiScale * mul;
              // Resize framebuffer
              resize(width * mul, height * mul);
              // Pre-render, from Minecraft.runGameLoop() 
              GlStateManager.pushMatrix();
              GlStateManager.clear(16640);
              mc.getFramebuffer().bindFramebuffer(true);
              // Render world 
              mc.entityRenderer.updateCameraAndRender(mc.getRenderPartialTicks(), System.nanoTime());
            }

This is called from outside of EntityRenderer.updateCameraAndRender() and it is compatible with shaders.

sp614x commented 7 years ago

Some shader packs have different set of shaders for the different dimensions so trying to render a view of another dimension may cause the shaders to be reloaded, which is slow.