Skip to content

Conversation

lukaschod
Copy link
Contributor

Purpose of this PR

  • Added warning for lit shader detailed abledo, if texture is not linear. [1342011]
  • Fixed lit detail correctly upgraded from standard shader. [1323725]

Testing status

Locally tested cases

@lukaschod lukaschod requested review from a team as code owners August 25, 2021 12:05
@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://yamato.cds.internal.unity3d.com/jobs/902-Graphics
Search for your PR branch using the sidebar on the left, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

URP
/.yamato%252Fall-urp.yml%2523PR_URP_2021.2

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@github-actions
Copy link

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

@lukaschod lukaschod requested a review from eh-unity August 25, 2021 12:06
Copy link
Contributor

@erikabar erikabar left a comment

Choose a reason for hiding this comment

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

Developer already tested both repro projects, approving without additional testing

…universal/detail-fixes

# Conflicts:
#	com.unity.render-pipelines.universal/CHANGELOG.md
- Fixed artifacts in Speed Tree 8 billboard LODs due to SpeedTree LOD smoothing/crossfading [case 1348407]
- Support undo of URP Global Settings asset assignation (case 1342987).
- Removed unsupported fields from Presets of Light and Camera [case 1335979].
- Fixed an issue where Unlit and ParticlesUnlit shaders did not have HDR color selection for albedo [case 1283767](https://issuetracker.unity3d.com/issues/built-in-unlit-particle-shader-has-hdr-color-selection-for-albedo-urp-unlit-particles-do-not)
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems merge issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

BaseShaderGUI.SetupMaterialBlendMode(material);
}

static void UpdateDetailScaleOffset(Material material)
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: it would be good to explain the upgrade behavior in comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added more info

Copy link
Contributor

@eh-unity eh-unity left a comment

Choose a reason for hiding this comment

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

Some review comments to think about. In general looks pretty good to me.

"Designates a Normal Map to create the illusion of bumps and dents in the details of this Material's surface.");

public static readonly GUIContent detailAlbedoMapScaleInfo = EditorGUIUtility.TrTextContent("Setting the scaling factor to a value other than 1 results in a less performant shader variant.");
public static readonly GUIContent detailAlbedoMapFormatError = EditorGUIUtility.TrTextContent("This texture is not in linear space.");
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is clear enough for our users. I think this might be confusing for some users, perhaps expand it a bit.

I think a good error message (is hard :) ) gives you the error and context (runtime parameters) and then points/guides you towards a likely fix.

  1. What is wrong
  2. What is the context (how we got there)
  3. What is the effect/end result (for example, detail texturing is skipped until fixed).
  4. What is the correct/expected state
  5. Suggestion how to fix it.

Can we give the current format of the texture in the message? so that you know what the format is when it's wrong and what it should be.

These were just my thoughts on this. No specific implementation requirements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is infobox, so usually we do not go so deep in details for the sake of UX. I kinda copied this from normal texture info box. Do you have particular suggestion into what it should change for better readability?

Copy link
Contributor

Choose a reason for hiding this comment

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

I also think some users will struggle with connecting linear space to the sRGB tick box. Maybe "This texture is marked as sRGB (Gamma space)"?
I think its ok to be a bit more clear since the "fix now" button is not available.

static void UpdateDetailScaleOffset(Material material)
{
// In URP details tile/offset is tied to base map tile offset
var baseScale = material.GetTextureScale("_BaseMap");
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this specific to our shaders? _BaseMap is attributed as [MainTexture] for us and default is of course _MainTexture.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is specific from builtin->urp shader where tile/offset needs to be recalculated to retain same visual

Copy link
Contributor

@Jonasmortensen Jonasmortensen left a comment

Choose a reason for hiding this comment

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

Looks good 👍
Will need to be updated when a new workflow for property highlighting lands.

@lukaschod
Copy link
Contributor Author

Smoke test fails on master https://unity-ci.cds.internal.unity3d.com/job/8721614.

Terrain issues instabilities

URP_Foundation on Android_OpenGLES3_Standalone_il2cpp_Linear on version trunk - instability

@lukaschod
Copy link
Contributor Author

All failing issues happens on master too, merging.

@lukaschod lukaschod merged commit 6c19563 into master Sep 16, 2021
@lukaschod lukaschod deleted the universal/detail-fixes branch September 16, 2021 08:34
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