1
\$\begingroup\$

Currently i'm using HDRP in my project, so i have a question. How can i access Lit shader properties through code ? Or where i can see names of variables in this shader ?

For example:

enter image description here

\$\endgroup\$
1
\$\begingroup\$

HDRP is still under heavy development and all the code is still in flux. Even if you find some code that works right now chances are it will stop working very soon. That's why there aren't really any tutorials/etc for HDRP code yet. Really, the safest shader method right now is to use Shader Graph.

But... you can find the source code for all the SRP/Shader Graph stuff here. The particular variable you highlight in your screenshot is called _BaseColorMap for the texture part and _BaseColor for the color part. Where those variables are used depends on the rendering path you have selected and which features you have enabled in the shader.

Once the code stabilizes it will be easier to point to specific bits of code to show what does what. I'm looking forward to that myself.

(Answer by Jick87 on Unity3D forum)

\$\endgroup\$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.