Unify Emissive mapping options on lit shaders#3606
Conversation
|
It appears that you made a non-draft PR! |
|
Could you please elaborate a bit why this PR is needed instead of just telling what has changed ? Thanks a lot ! :) |
I don't know about the missing UV1, UV2 and UV3 |
I added more context
sorry about that, I tried to clarify what I tested, but there's no fogbug associated |
…ies/Graphics into hd/emissive-tessellation
JMargevics
left a comment
There was a problem hiding this comment.
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.
|
I think the crash reported by jans when switching shader is not related to the PR, but it would need confirmation |
|
Hey Adrien, i just deleted a library folder and to be safe did a |
JMargevics
left a comment
There was a problem hiding this comment.
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 ✅

Purpose of this PR
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
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
UV set for emissive on layered lit shader was missing UV1 to UV3 option for no good reason
base color scale offset blending between layers in layer lit shader was broken (I didn't try to reproduce it but code was wrong)
Fixed some warning on layeredlittessellation and littessellation due to duplicated keywords
Testing status
Manual tests:
Updated graphics test 1221