Skip to content

songrise/Unity-Sketch-Style-Shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity-Sketch-Style-Shader

Non-photorealistic shader for Unity 5. It simulates pencil strokes using a customized tone-mapping scheme. Based on nkihrk's, the original paper could be found at acm.

Usage

Applied this shader to the 3D object, then in Unity inspector, set the Hatch1~5 as the texture provided.

Parameters

  • Hatch0~5...... Paste the created TAM (Tonal Art Map). You can create your own TAMs, referring to the paper
  • Outline Mask Texture...... Any outline to delete. Prepare a black background and fill the area you want to erase in white.
  • Outline Color...... Sets the color of the outline.
  • Outline Width...... Sets the width of the outline (depending on magnitude of the model).
  • Threshold...... Limits the effect of the light color of the world light by a threshold. (suggestion: do not modify this)
  • Density...... You can adjust the tint of the shadows.
  • Roughness...... You can adjust the roughness of the shadows.
  • Toggle Gray Scale...... Make the color grayscale.
  • Cull Mode...... Cull can be set
  • Blend Factor...... Controls the smoothness of tone transition, from 1 to 10. 1: no smoothness, 10 smooth transition (see figure below).

smoothness of tone transition

About

Non-photorealistic shader for Unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published