Skip to content

Commit

Permalink
Toon shading add antialiasing (#24406)
Browse files Browse the repository at this point in the history
* Toon shading add antialiasing

* Update gradientmap_pars_fragment.glsl.js

* Update gradientmap_pars_fragment.glsl.js

* Update gradientmap_pars_fragment.glsl.js

Co-authored-by: Michael Herzog <[email protected]>
  • Loading branch information
RenaudRohlinger and Mugen87 authored Aug 1, 2022
1 parent 03f35a9 commit ecf065f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
#else
return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );
vec2 fw = fwidth( coord ) * 0.5;
return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
#endif
Expand Down

0 comments on commit ecf065f

Please sign in to comment.