Skip to content

Conversation

oleks-k
Copy link
Contributor

@oleks-k oleks-k commented May 19, 2020

DOC-1818
New pages with guidelines on writing shaders in URP.
Please review the texts for technical correctness.
To make the review more convenient, I've created the preview here:
https://docs-mizu.unity.com/oleks-k/manual/writing-custom-shaders-urp.html

On the page, the examples will go in this order: Basic - Color - Normal - Texture.
@oleks-k oleks-k changed the title Added the shader code examples for review. DOC-1818 Writing URP shaders Jun 18, 2020
@oleks-k oleks-k marked this pull request as ready for review June 18, 2020 05:34
@oleks-k oleks-k requested a review from a team as a code owner June 18, 2020 05:34
@oleks-k oleks-k requested a review from phi-lira June 18, 2020 05:34
@oleks-k oleks-k requested a review from ellioman June 18, 2020 05:36
{
// Declaring the output object (OUT) with the Varyings struct.
Varyings OUT;
// The TransformObjectToHClip function transforms vertex positions from
Copy link
Contributor

Choose a reason for hiding this comment

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

Same overflow issue here

// To make the shader SRP Batcher compatible, declare all properties related to
// a Material in a a single CBUFFER block with the name UnityPerMaterial.
CBUFFER_START(UnityPerMaterial)
// The following line declares the _BaseColor variable, so that you can use
Copy link
Contributor

Choose a reason for hiding this comment

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

Overflow :)

Copy link
Contributor

@ellioman ellioman left a comment

Choose a reason for hiding this comment

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

I think this is a fine start to the shader docs.
I've added some comments mostly regarding formatting.

@oleks-k oleks-k marked this pull request as draft June 22, 2020 19:51
@oleks-k oleks-k requested a review from reallyfancy June 29, 2020 11:52
Copy link
Contributor

@reallyfancy reallyfancy left a comment

Choose a reason for hiding this comment

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

Terminology pass - if I missed any instances, please update them to the correct term according to the other examples/the updated shader glossary. Any questions, let me know!

@oleks-k oleks-k requested a review from siobhan-unity July 1, 2020 12:52
Copy link

@siobhan-gibson siobhan-gibson 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, mostly just grammatical fixes! Pre-approving the suggested changes.

@oleks-k oleks-k marked this pull request as ready for review July 6, 2020 11:48
@ellioman ellioman merged commit 5bb4d10 into master Jul 6, 2020
@ellioman ellioman deleted the universal/DOC-1818-shader-examples-for-review branch July 6, 2020 12:45
oleks-k added a commit that referenced this pull request Jul 7, 2020
stramit pushed a commit that referenced this pull request Jul 7, 2020
* backported #550.

* Backported #1166.

* Backported #1169

* backported #247

* backported #383

* backported #655

* backported #1066

* backported #234

* backported #1114
oleks-k added a commit that referenced this pull request Jul 29, 2020
phi-lira pushed a commit that referenced this pull request Aug 4, 2020
)

* Applied PR #550

* Replaced jpg with png.

* Backported PR #1431

* Deleted the .shader files (backported a wrong commit).
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.

6 participants