Skip to content

Unify Emissive mapping options on lit shaders#3606

Merged
sebastienlagarde merged 8 commits into
hd/bugfixfrom
hd/emissive-tessellation
Feb 28, 2021
Merged

Unify Emissive mapping options on lit shaders#3606
sebastienlagarde merged 8 commits into
hd/bugfixfrom
hd/emissive-tessellation

Conversation

@adrien-de-tocqueville

@adrien-de-tocqueville adrien-de-tocqueville commented Feb 23, 2021

Copy link
Copy Markdown
Contributor

Purpose of this PR

  1. In a previous PR adding support of POM to emissive map (Added support for POM for emissive map #51), I didn't modify the lit tessellated and lit layer tessellated shaders because they don't have POM.
    Updated them to still show the "same as base" option on to synchronize the main texture tiling and offset with emissive map

  2. On lit (nothing/layered/tessellated) shaders, when using UV0 on base color, UV1 was set to zero and using it for emissive map was broken

  3. UV set for emissive on layered lit shader was missing UV1 to UV3 option for no good reason

  4. base color scale offset blending between layers in layer lit shader was broken (I didn't try to reproduce it but code was wrong)

  5. Fixed some warning on layeredlittessellation and littessellation due to duplicated keywords


Testing status

Manual tests:

  • created a lit tessellation and layered lit tessellation materials with emissive UV mapping set to "same as base". Verified that tiling and offset of the main color texture was also applied to the emissive map
  • created a lit shader with base UV set to UV0 and emissive UV set to UV1 and applied it on a mesh with 2 uv set created on blender. Verified that now it works correclty

Updated graphics test 1221

@github-actions

Copy link
Copy Markdown

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page)
and cancel any jobs that started on Yamato.
See the PR template for more information.
Thank you!

@sebastienlagarde sebastienlagarde requested review from a team and JordanL8 February 23, 2021 11:17
@JordanL8

Copy link
Copy Markdown
Contributor

When I flagged this yesterday, it was for the difference between layered lit and layered lit tessellation. Looking at this, layered lit's is still
image
Is changing this in scope of this PR too?

@remi-chapelain

Copy link
Copy Markdown
Contributor

Could you please elaborate a bit why this PR is needed instead of just telling what has changed ?
And in the testing status, you said tested on project, which project are you talking about, is there a fogbugz somewhere referencing this ?

Thanks a lot ! :)

@adrien-de-tocqueville

Copy link
Copy Markdown
Contributor Author

When I flagged this yesterday, it was for the difference between layered lit and layered lit tessellation. Looking at this, layered lit's is still

I don't know about the missing UV1, UV2 and UV3
@sebastienlagarde do you know who made the layered lit shader and could maybe answer ?

@adrien-de-tocqueville

adrien-de-tocqueville commented Feb 23, 2021

Copy link
Copy Markdown
Contributor Author

Could you please elaborate a bit why this PR is needed instead of just telling what has changed ?

I added more context

And in the testing status, you said tested on project, which project are you talking about, is there a fogbugz somewhere referencing this ?

sorry about that, I tried to clarify what I tested, but there's no fogbug associated

@adrien-de-tocqueville adrien-de-tocqueville changed the title Add POM to emissive on tessellated shaders Unify Emissive mapping options on lit shaders Feb 25, 2021

@JMargevics JMargevics left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tess.mp4

✅ I've played with LayeredLitTesselated + emissive maps, tried using planar and tri-planar Uvs on main layer. No issues functionally.
✅ Automated test has been updated.

crash.mp4

❌ Unfortunately if you load up a fresh project (no library folder) and try to convert a LayeredLit to LayeredLitTessellation it will crash Unity. When you open the project second time crash doesn't happen. This reproduced on my and Adrien's machines.

@adrien-de-tocqueville

adrien-de-tocqueville commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

I think the crash reported by jans when switching shader is not related to the PR, but it would need confirmation

@JMargevics

Copy link
Copy Markdown
Contributor

Hey Adrien, i just deleted a library folder and to be safe did a git clean -fdx on my graphics repo, reopened automated tests on Master branch and could not reproduce the crash. Will try extract the layeredmaterial and reproduce on an empty project.

@JMargevics JMargevics left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not manage to reproduce this crash anymore, no matter what I tried. I agree that this one is not related to this PR, could be something with drivers. Got no other issues, approving the PR ✅

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants