-
-
Notifications
You must be signed in to change notification settings - Fork 506
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
Improve visibility of membrane textures #5699
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could have fixed the minor style problems myself but I noticed this one major thing I don't understand so I have to ask you to clarify / do some changes on this.
shaders/Membrane.gdshader
Outdated
@@ -10,9 +10,10 @@ uniform sampler2D albedoTexture : source_color; | |||
uniform sampler2D damagedTexture : source_color; | |||
|
|||
uniform sampler2D normalTexture; | |||
uniform sampler2D wiggleNormalTexture; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this called "wiggleNormal"? As far as I can see there isn't a difference between the first normal map and the second in terms of wiggle (both seem to be now affected by it). Is there a typo perhaps or did you just mean to have two normal maps? In the latter case I think the variable needs renaming (and the relevant variables in the membrane C# code).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to have them move separately, although I'm not sure there's a need for it. I'll look at making it move relative to the other normal. The alternative would be reverting most of the shader changes and making the new normals more bumpy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you didn't mean to break a fix by @dligr the normal bump map is supposed to use UV2 and not just the first UV. So if you redo that change to preserve that, then this would all make sense as the second bump map would be affected by the wiggles and the first one wouldn't be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've experimented with this, and I just don't see any difference in using the UV2. The shader was scaling the UV2 and applying the normal map on the basis of that. The other effects on the normal were based on the value of the normal map as applied, and it makes no difference if it's UV1 or UV2.
What I've now done is removed the second normal map, replaced the normal map texture with one that includes any extra bumpiness required, and applied it via UV1. The effect is the same whichever channel I use, so I might as well use the same one as the albedo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way UV2 was calculated is actually not scaling, but rather something like a projection from a flat plane. UV1 is different in that it's kind of wrapped around the cell.
You can check the difference on larger cells, where bumps would be more streched, while with UV2 they would repeat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I see your point. I hadn't fully compared larger and smaller cells. I'll have to change it back to split normals.
This PR is waiting for those couple of technical fixes. |
Brief Description of What This PR Does
Adds new membrane textures, making different cell types more visually distinct.
Related Issues
#5582
Progress Checklist
Note: before starting this checklist the PR should be marked as non-draft.
break existing features:
https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
(this is important as to not waste the time of Thrive team
members reviewing this PR)
styleguide.
Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.