Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
121 stars 2 forks source link

Some Filter Shaders forgetting their Values #2058

Open AngelboyVR opened 1 month ago

AngelboyVR commented 1 month ago

Describe the bug?

Some Filters (Refraction and Blur from my experience) are forgetting their Values on World start or messing with some other Values. after changing the Values to something else and then back to what they were before, it remembers and updates itself again.

To Reproduce

Example World where this issue is most visible resrec:///U-Angelboy/R-8eb96b81-e1be-4689-ae5d-5c67da7ce606

Open a fresh World, create a new object with these Filter Shaders (Refraction or Blur) on it create a transparent object of any kind as well as another Filter shader (Refraction or Blur) and place them behind the main Shader in question. so you can see the issue behind it as you change the values set "Renderqueue" of the main Shader to -1 set "Depthbias" of the main Shader to 0 then do either of the two following:

  1. save the World and close it, then open it again
  2. change "ZWrite" state to anything else

What Happens is that the Renderqueue and the Depthbias forget their settings despite the value not changing in the value field visually, and you can see that by holding that shader infront of any transparent object or any other Filter shader.

Expected behavior

the Renderqueue and the Depthbias should respect their values and not reset after changing some other values or after reopening the world.

Screenshots

image image image image image

Resonite Version Number

Beta 2024.5.7.505

What Platforms does this occur on?

Windows

What headset if any do you use?

No response

Log Files

DESKTOP-IODHD88 - 2024.5.7.505 - 2024-05-19 02_33_53.log

Additional Context

No response

Reporters

draycethevoidangel

shiftyscales commented 1 month ago

The replication steps are simpler than you reported, @AngelboyVR.

I created a world, created a refract material, set a depth bias to a custom value, saved the world, re-opened the world, and found it default to 1.

The rest of the steps are not needed to replicate the issue.

Seeking feedback from @Geenz. What is particularly odd about this is the default value of a refract material when it is freshly created has a depth bias of 0- so it isn't even just that the values are being reset to default- rather for some reason the depth bias is being forced to "1" every time the world is opened for some reason.

AngelboyVR commented 1 month ago

The replication steps are simpler than you reported, @AngelboyVR.

I created a world, created a refract material, set a depth bias to a custom value, saved the world, re-opened the world, and found it default to 1.

The rest of the steps are not needed to replicate the issue.

Seeking feedback from @Geenz. What is particularly odd about this is the default value of a refract material when it is freshly created has a depth bias of 0- so it isn't even just that the values are being reset to default- rather for some reason the depth bias is being forced to "1" every time the world is opened for some reason.

ye, its indeed simpler to recreate that bug, hence why i mentioned, to either restart the world OR play with the Zwrite value at the bottom of the shader, not necessarily both.

the extra steps of creating another shader and a transparent object to place behind it, is just to make it visually very obvious when the shader dies again as the values may not change in the value field and pretend they are set to something else, untill updated.

essentially my description just points out the depthbias and the renderqueue forgetting what value they are currently set to (even if visually, in the value field, the value stays the same) or even changing the value entirely all by itself, without having to touch it. some of these ghostly actions happen on restart of the world some after after playing with other values most noticeably with the Zwrite values.

this may occur in other shaders as well not just refract and blur, ill have to check that

shiftyscales commented 1 month ago

I see. Thanks for the additional clarification @AngelboyVR. In future- it is best to minimize potential variables in your replication case, and keep the replication case as simple as it can possibly be. This helps us ensure we are looking in the right areas when it comes to fixing the issue. :)

Thank you for providing screenshots, and a replication world - those are also quite useful in helping us test things.