Coder Social home page Coder Social logo

unity-technologies / com.unity.toonshader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unity3d-jp/unitychantoonshaderver2_project

1.0K 29.0 159.0 1.01 GB

Unity Toon Shader ( an experimental package )

License: Other

C# 77.24% ShaderLab 9.62% HLSL 12.07% Mathematica 1.06%

com.unity.toonshader's Introduction

com.unity.toonshader's People

Contributors

h3idi-x avatar hum9183 avatar kore4n avatar miyabi avatar nobuyuki-kobayashi avatar riina avatar sindharta avatar tangx246 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

com.unity.toonshader's Issues

Dots Instancing is not enabled. How to get to work in subscene?

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

re-word

Specular color blending mode. Multiply or Add. **Color Blending Mode** is disabled when **Specular Mode** is **Soft**.

Re-word:
Specular color blending mode allows the user to control the hardness of the colour applied to the highlight. Users have two options: Multiply or Add. Note that Color Blending Mode is disabled when Specular Mode is set to Soft.

Unity Docs review -What's-new-0.6.x.md

Regarding the following line in whats-new-0.6.x.md

[The Unity Toon Shader became an experimental package. So the package is installable via Package Manager . Please refer to installation.md.]()

There are the following issues:

  • Passive voice (is installable)
  • Past tense (became)
  • Use of latin terms (via)

To fix these issues, I suggest the following:

From Version 0.6.x the Unity Toon Shader is an experimental package. To install it, use the Package Manager and follow the instrctions in Installation.

Error when creating/importing material that prevents outline from working

Describe the bug
I installed the latest version of package into my URP project and tried to create a new material but I received the following two errors in the console. I received the same errors when importing the URP sample scenes.

`[Worker0] Failed to create MaterialEnum, enum UnityEditor.Rendering.HighDefinition.TransparentCullMode not found

[Worker0] Failed to create material drawer Enum with arguments 'UnityEditor.Rendering.HighDefinition.TransparentCullMode'

`

The features of the shader seem to work correctly except for the outline. The outline simple does not show up despite enabling it in the shader settings.

To Reproduce
Steps to reproduce the behavior:

  1. Install toonshader package into URP project
  2. Create material or import sample scenes
  3. Error

Desktop

  • Version 2021.3.21f1
  • URP 12.1.10

Bug in UTS3Converter.cs

Bug in UTS3Converter.cs

I just import Toon Shader from com.unity.toonshader.
Then I got an error, it said "Library\PackageCache\[email protected]\Editor\Converter\UTS3Converter.cs(159,39): error CS0122: 'BasePopupField<string, string>.choices' is inaccessible due to its protection level"

Screenshot (2237)

Desktop (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2020.3.20f1

Glitches on Steam Deck

Animation1

Animation

I made linux build with Unity LTS 2021.3.16f1 for running it on valve's steam deck.
and UTS with outlines are glitching.

I'm using URP.
Tried legacy UTS for URP and UTS3 0.8.2
and both glitches same.

Re-wording

Texture alpha channel is used for clipping mask. If disabled, alpha does not affect at all. The color of the **Angel Ring** can be specified directly instead of using the additive method.

Correction:
Texture alpha channel is a clipping mask. If disabled, the alpha is not affected at all. The color of the Angel Ring can be specified directly instead of using the additive method.

I'm not sure if you mean 'Affected' or 'applied' here. Please use the right one to your discretion

Compilation Errors in 0.9.0

Describe the bug
There are compilation errors after importing 0.9.0

To Reproduce
Steps to reproduce the behavior:

  1. Install version 0.9.0
  2. Observe errors in console

Expected behavior
Be able to install 0.9.0 without errors

Screenshots
image

Desktop:

  • OS: Windows 11
  • Version 22H2

Additional context
The errors are regarding AnalyticsResult and suggest installing Unity Analytics in the Package Manager. Doing so does not resolve the issue. If the Toon Shader package is reliant on Unity Analytics then should it be a dependency?

How could we upgrade SD Kohakuchanz material properly ?

Describe the bug

Since there is this package SDKohakuchanz from 2016 https://unity-chan.com/download/releaseNote.php?id=SDKohakuchanz that using outdated built-in material, unlike other package (SD Tokochanz https://unity-chan.com/download/releaseNote.php?id=SD_Toko and other similar package released in the same time at 2019). When we switch to this repo's shader it give me weird lighting effect like below screenshot

I can't find newer version of this package and cannot find a way to properly upgrade these material. It seem the format of texture and material (of 2016) was also not the same as newer version (2019)

So is it possible to create new package for these model or have a script to upgrade the old material into newer version? Or is there an updated package I could downloaded from?

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://unity-chan.com/download/releaseNote.php?id=SDKohakuchanz
  2. Import unitypackage
  3. Switch magenta material's shader into toon

Expected behavior
It should set default material as proper as possible

Screenshots

image

image image

Additional context

Alternatively please make a package for all SD character with newer version of shader in the same config pattern

Unity Docs review -What's-new-0.5.x.md

Regarding the following line in whats-new-0.5x.md

compatibility with HDRP Arbitrary Output Variables(AOV) is added to the Unity Toon Shader, which makes it possible to record Beauty, Albedo, Normal and other AOV sequential images using Recorder later than 3.0.

When using HDRP AOV, Outline needs to be desabled. Please, refer to Known Issues.

There are the following issues:

  • Incorrect lower case (Compatibility)
  • Passive voice (is added, needs to be desabled)
  • Spelling error (desabled)

To fix these issues, I suggest the following:

From version 0.5.x, the Unity Toon Shader is compatible with HDRP Arbitrary Output Variables (AOV). This means you can now record Beauty, Albedo, Normal and other AOV sequential images using Recorder version 3.0 or later.

When you use HDRP AOV, you need to disable Outline. For more information, refer to Known Issues.

I also added a link to Known Issues for usability.

Point light and outline issues

2023-02-25_044
2023-02-25_043

  1. When there is a point light, shade appears with unwanted style.

  2. Outline seems not affected by lights, because it always looks brighter in darker scenes.

re-wording

Apply Base Map to the **1st Shading Map**. When **Apply to 1st Shading Map** is checked, texture map in **1st Shading Map** is not used fore redering and its texture UI is disabled.

Correction
Apply Base Map or the 1st Shading Map to the 2nd Shading Map. When 'Apply to 2nd Shading Map' is checked, the texture map in 2nd Shading Map is not used for rendering and its texture UI is disabled.

Unity Docs review Basic.md - 3

# Three Color Map and Control Map Settings

There's many spelling mistakes on this page and a lot of passive voice. I recommend using a spelchecker to fix the spelling mistakes, and refer to the Microsoft style guide to see what I mean by passive voice.

"You" is the best word to solve many passive voice issues. For example, you can fix this passive sentence:

When Apply to 1st Shading Map is checked...

By saying:

When you check the Apply to 1st Shading Map...

Toon is not in the URP shader option.

Describe the bug
After installing the package from git, or even from disk, toon doesn't show up in the URP dropdown list.

To Reproduce
Steps to reproduce the behavior:

  1. Go to package manager and install the package with the latest preview.
  2. Click on add new material and then add a shader from the URP menu
  3. Scroll down the list and you won't see it there.
  4. See error

Expected behavior
You are supposed to see toon in the options list.

Screenshots
Unable to get a scr

Desktop (please complete the following information):

  • OS: WIndows 10
  • Browser Chrome
  • Version [e.g. 22]

Version of Unity I am using is 2022.2.8f1

Additional context
Add any other context about the problem here.

Shader error in 'Toon': undeclared identifier 'sampler_LinearClampCompare'

  • Unity version: 2022.2.9f1
  • URP version: 14.0.6
  • UTS version: 0.9.0-preview
  • Template: URP 3D

This is a new empty project.

Describe the bug
I followed this doc on how to install UTS: https://docs.unity3d.com/Packages/[email protected]/manual/installation.html

And then I got an error:

Shader error in 'Toon': undeclared identifier 'sampler_LinearClampCompare' at URP/Library/PackageCache/[email protected]/Runtime/UniversalRP/Shaders/UniversalToonBody.hlsl(238) (on d3d11)

Compiling Subshader: 1, Pass: ForwardLit, Fragment program with _EMISSIVE_SIMPLE _IS_ANGELRING_OFF _IS_CLIPPING_OFF _IS_TRANSCLIPPING_OFF
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED FOG_EXP FOG_EXP2 FOG_LINEAR LIGHTMAP_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING UTS_USE_RAYTRACING_SHADOW _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _EMISSIVE_ANIMATION _FORWARD_PLUS _IS_ANGELRING_ON _IS_CLIPPING_MODE _IS_CLIPPING_TRANSMODE _IS_TRANSCLIPPING_ON _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MIXED_LIGHTING_SUBTRACTIVE _SHADINGGRADEMAP _SHADOWS_SOFT

Other people also get the same error with Unity 2022.2.11f1 https://forum.unity.com/threads/massive-breaking-changes-in-urp-14-0-6-in-unity-2022-2-11.1414086/

To Reproduce
Steps to reproduce the behavior:

  1. Open new project with URP 3D template using Unity 2022.2.9f1
  2. Add package from git url: com.unity.toonshader
  3. Wait for the package manager to finish installing UTS
  4. Create a new material and change the shader to the Universal Render Pipeline/Toon shader. But due to shader compilation error you can't find it there, instead you can find it in Failed to compile/Toon. Change the shader to Failed to compile/Toon.
  5. See error

Expected behavior
UTS installed successfully without error.

Unity Docs review AngelRing.md -4

Texture alpha channel is used for clipping mask. If disabled, alpha does not affect at all. The color of the **Angel Ring** can be specified directly instead of using the additive method.

Suggest the following language improvements to remove passive voice:

Use the Texture's alpha channel to apply a clipping mask.... You can specify the color of the Angel Ring directly instead of using the additive method.

I'm not completelly sure what "If disabled, alpha does not affect at all" means. Be clear about what the user disables and what the alpha does not affect.

Unity Docs review AngelRing.md -2

Angel Ring effect for UTS, which is used to express shine or luster in hair. Angel Ring always appears in a fixed position as seen from the camera. Angel Ring requires the 2nd UV in the meshes.

I suggest a few general language improvements:

The Angel Ring effect for UTS expresses shine or luster in hair. This effect always appears in a fixed position as seen from the Camera. Angel Ring requires the 2nd UV in the meshes.

re-wording

Angel Ring effect for UTS, which is used to express shine or luster in hair. Angel Ring always appears in a fixed position as seen from the camera. Angel Ring requires the 2nd UV in the meshes.

Correction:
Angel Ring is an effect for UTS, used to express shine or luster in hair and always appears in a fixed position as seen from the camera. This feature requires the use of a 2nd UV in the meshes.

Magenta on Android.

Describe the bug
When running on an Android device, all objects using the toon shader show as magenta -- the magenta Unity shows objects as when there is a shader issue.

To Reproduce
Steps to reproduce the behavior:

  1. Create new Unity URP project in Unity 2022.1.14f1
  2. Add the toon package 0.8.1-preview. Install the URP examples. Demo scenes look fine in the Unity editor.
  3. Make an Android build containing any example scene
  4. When the game launches on the phone, the objects with the toon shader on them show as magenta.

Smartphone (please complete the following information):

  • Device: tried on Pixel 3a, and Poco F3. Both reproduce
  • OS: Android

Bloom Issue

Describe the bug
When importing a custom mesh (fbx from Blender 3.3.1), some of them (seemingly flat faces) are causing the built in bloom to behave strangely/be over exposed filling the screen. The faces of the mesh causing it are completely black. This only occurs when using the toon shader/material and only with certain custom meshes (others seem to work fine). All export settings are the same for meshes working correctly, all normals are facing the correct way etc. When rotating the objects that have the issue, the bloom behaves as expected (even by the slightest rotation of 0.01) - see attached.

To Reproduce
Unsure on reproduction - some meshes work fine and others don't.

Expected behavior
Bloom should not be so strong and flood faces black.

Screenshots
https://user-images.githubusercontent.com/50808370/194706349-ac4e6c97-02d3-4358-963a-84d0ba6230fd.mp4

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: Unity 2021.3.11f1 (URP)

Toon-shaded plane cannot be selected

Describe the bug
A plane with a toon material cannot be selected from the front in the scene view.
It is possible to select it from the back (its invisible side).

To Reproduce
Steps to reproduce the behavior:

  1. Create a toon material
  2. Create a plane in the scene
  3. Apply the material to the plane
  4. Try and click on the plane's front in the Scene View.

Expected behavior
A plane should remain selectable normally, from the front.

Desktop (please complete the following information):

  • OS: Windows 10
  • Unity version 2022.1.10f1

EDIT: Removing the Outline pass from the shader code fixes the issue.

Base Map missing Tiling & Offset controls

Describe the bug
The base diffuse map for the toon material is missing tiling & offset parameters, while Normal, MatCap and Emission maps have this control.

To Reproduce
Steps to reproduce the behavior:

  1. Install toonshader package
  2. Create a new material based on the Toon shader
  3. Scroll down to Three Color and Control Map Settings

Expected behavior
The Base Map and other shading maps should have tiling & offset controls.

Desktop (please complete the following information):

  • OS: Windows

Additional context
I don't know if this is how it should be, but it definitely is not ideal to not have tiling & offset controls, I want to be able to tile textures. :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.