some problems in 2.0.3.1120

  • Posts: 177
4 years 3 months ago #1 by kingeric1992
1. I can't get the mouse keycode to work while other keycodes work just fine. (for reference, I'm using razor mouse)

uniform bool LMB < source = "key"; keycode = 0x01; toggle = false; >; // didn't work
uniform bool F3 < source = "key"; keycode = VK_F3; toggle = false; >; // works normally

2. Using tex2Dfetch(sampler, int2) as stated in reference doc will return compiler error, changing to int4 fix the problem.

3. Is it possible to declare a global array? Tried with several different prefix, it still returns the "initial value must be literal" error.
(tested with array: float test[5] = { 0, 1, 2, 3, 4 }; )

Please Log in or Create an account to join the conversation.

  • Posts: 3741
4 years 3 months ago - 4 years 3 months ago #2 by crosire
1. See reshade.me/forum/troubleshooting/1922-mo...ns-to-toggle-effects .
2. Good catch. Need to fix that. Using int4 is probably better, because that would allow to specify a mip-level too.
3. No, only local arrays are supported.
The following user(s) said Thank You: kingeric1992

Please Log in or Create an account to join the conversation.

  • Posts: 177
4 years 3 months ago - 4 years 3 months ago #3 by kingeric1992
The post mainly discuss on toggling effect, which I assume is focusing on technique syntax.

So is it that there isn't a mouse keycode in current version, or there is but I'm doing it wrong?
Was hoping to have uniform bool for mouse buttons like other keys.

And about the key combinations, are they still available?

Please Log in or Create an account to join the conversation.

  • Posts: 3741
4 years 3 months ago #4 by crosire
The mouse doesn't have keycodes in the traditional sense. They are listed as virtual key codes, because Win32 has a few functions which work with mouse buttons too, but those are deprecated. The mouse and keyboard are separate and are handled separatly.
That's why anything in ReShade that asks for a keycode only accepts exactly that: a keyboard keycode, nothing else.
Key combinations are still available, sure.

Please Log in or Create an account to join the conversation.

  • Posts: 177
4 years 3 months ago #5 by kingeric1992
OK, thanks. And if possible, may I make the request for mouse clicks?

Was able to rig up a UI with the newly added mouse pos, currently using keyborad to act as LMB on sliders though. Would be nice if mouse click is available.

Here is the screenshot on the progress.
File Attachment:

Please Log in or Create an account to join the conversation.

  • Posts: 3741
4 years 3 months ago #6 by crosire
Nice job! And sure, will do.
The following user(s) said Thank You: kingeric1992

Please Log in or Create an account to join the conversation.