Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey, here I am again! This time with an error I don't know why it's caused, I am basically trying to load the minecraft phosphor shader. Using entityRenderer#loadShader.

Each time I perform this however, it spams my console with this specific error:

[13:26:08] [Client thread/WARN] [minecraft/ShaderManager]: Could not find uniform named InSize in the specified shader program.

I don't know what causes this and when googling it I find no solution/explanation of the problem. Any thoughts? (I'll post the code if needed)

ย 

Thanks for taking your time with reading this!

  • Author

I render my code in the RenderGameOverlayEvent.Post, it simply starts spamming the error once it loads

ย 

	private static final ResourceLocation motionblur = new ResourceLocation("shaders/post/phosphor.json");

	public void onHUDrender(RenderGameOverlayEvent.Post render) {
Minecraft.getMinecraft().addScheduledTask(new Runnable() {
			@Override
			public void run() {
				if (Minecraft.getMinecraft().player != null) {
					EntityPlayerSP player = Minecraft.getMinecraft().player;
					if (Minecraft.getMinecraft().entityRenderer.isShaderActive()) {
						if (TempStorage.instance.getMyScreen()) {
							Minecraft.getMinecraft().entityRenderer.stopUseShader();
							TempStorage.instance.setMyScreen(false);
						}
					} else if (TempStorage.instance.getFreezeKeyBoard()) {
						if (TempStorage.instance.getFreezeKeyBoard()) {
							Minecraft.getMinecraft().entityRenderer.loadShader(motionblur);
							TempStorage.instance.setMyScreen(true);
						}
					}
				}
			}
		});
      	}

ย 

Why are you scheduling this as a task to the client thread? Shader binding must be done on the GL/render thread.

Also the player should never be null during RenderGameOverlay event.

Additionally rendergameoverlay event fires multiple times per frame per element being rendered. You need to check the one currently rendered.

ย 

ย 

  • Author

That makes sense now you say it.ย How do I switch to the GL/render thread though? (Sorry if this is some basic question I could've found in 20 mins googling)

  • Author

That's why I tried running it on the main thread, because I got the same error when not having it run on the main thread. (I changed the code a bit, for some reason I double check freezeKeyBoard? I am pretty blind sometimes) Fixed it by changing the code a bit, for some reason I thought I'd be smart to load and unload it in the same tick. Ty for your help though!

Edited by Naomiora

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.