Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UniformTexture in VisualShader Not Being Applied / Saved in Some Situations #34540

Open
marcosn41 opened this issue Dec 22, 2019 · 3 comments
Open

Comments

@marcosn41
Copy link

marcosn41 commented Dec 22, 2019

Godot version: 3.2 beta 4

OS/device including version: Windows 10

Issue description: UniformTexture in VisualShader is not being applied / saved in some situations. It is shown in the viewport, but running the game has no effect and when I reload the project no longer appears the texture placed. I noticed that only when saved the first time saves successfully, but if I have several meshs with material, when changing them (are unique) the others do not save

Steps to reproduce:

  1. Add a InstanceMesh
  2. Load a mesh and create a VisualShader to surface of the mesh
  3. Make a UniformTexture and put in a Channel (in my case metal and roughness) then Save Material
  4. Duplicate InstanceMesh and load material, make unique
  5. Change UniformTexture of the InstanceMesh copy and run
  6. On editor shows the change, but in game keep with old texture or empty
  7. When i reload project, on InstanceMesh copy has no changes

Every time i make these steps happens this.

Minimal reproduction project:

@marcosn41
Copy link
Author

Ok, i notice uniform only save on first save after opened godot, after this every change even showing on editor, doenst affect on running, after loading anything has changed on second time save

@Chaosus
Copy link
Member

Chaosus commented Jan 22, 2020

I wish I could help but I cannot reproduce it, can you try to get it on recent rc2 build - and if you are a success - make a short video to show this problem clearly, thanks.

@tom-jk
Copy link

tom-jk commented Jul 16, 2020

I believe I can reproduce this (or something like this) on 3.2.2.stable.

When I follow the steps, at step 4 I make the material unique, but I do not make the visual shader unique. So, when I edit the shader in the new material I am changing it for the old as well.

If I reload the scene, both materials now have unique visual shaders. I think this change should instead be happening either at the same time as making the material unique, or not at all. It looks like a bug.

If on step 4 I make both the material and visual shader unique, then the two materials are properly independent of each other.

I don't seem able to reproduce the "different in editor and game" effect mentioned.

video: https://youtu.be/Y-Vw8zjh2Fk

note: on step 5 ("change uniform") I instead put connections through a oneminus node, as changing the textureuniform wasn't making a visible difference (haven't used visualshader before, I guess you're supposed to supply an actual texture but that wasn't in the steps so...) I don't think it matters but just so you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants