Git Product home page Git Product logo

Comments (4)

Kadae avatar Kadae commented on May 8, 2024

Hi, you can try to add this to the shader...

_MainTex("Main Texture", 2D) = "SimpleURPToonLitExample(With Outline)" {}

I have similar issues on another shaders, but this is a hotfix, lol.

from unityurptoonlitshaderexample.

boxseto avatar boxseto commented on May 8, 2024

I tried but it seems not working...
Do you mean adding the line in properties section of SimpleURPToonLitOutlineExample.shader file?
I tried to add there, plus adding/removing the code for _BaseMap, but still the texture does not render.

Can I ask if your fix is trying to "add a new texture to the shader" or "replace the texture of the _BaseMap texture"?

from unityurptoonlitshaderexample.

Kadae avatar Kadae commented on May 8, 2024

I just added this to Properties, but this helps in another shader, not in this.
Important: the name must be the same as the Shader's name (first line of code).

_MainTex("Main Texture", 2D) = "** SHADER NAME **" {}

If this not works, so... I don't know, sorry.

from unityurptoonlitshaderexample.

boxseto avatar boxseto commented on May 8, 2024

OK, so after some testing and poking around, I found that the problem is I used the wrong pipeline...

Make sure you choose "Universal Render Pipeline" when creating a project:
image

I have chosen "3d", but it does not render correctly even after I imported URP in packet manager (not sure why, so you may need to search on swapping pipeline if you are upgrading it).

For those tries to use this with Unity Chan (For Absolute Beginners like me):

  1. Open new project with URP selected
  2. Install Unity chan and this project
  3. go to /Assets/unity-chan!/Unity-chan! Model/Art/Models and put the model to scene
  4. go to /Assets/unity-chan!/Unity-chan! Model/Art/Materials, the preview should be all wrong; this indicate that the pipeline of original Unity-Chan is using a different rendering pipeline
  5. for each of the material, change its shader to the one in this project

In the end something like this should be seen:
image

It does not look good but at least it renders. From here I can try to poke around with the project code. Thanks!

TL;DR: Purple is wrong pipeline, Are you sure you are using URP?

from unityurptoonlitshaderexample.

Related Issues (15)

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.