Skip to content

Commit

Permalink
fix: sdf direction
Browse files Browse the repository at this point in the history
  • Loading branch information
lilxyzw committed Oct 9, 2024
1 parent 11b71df commit 2b3aca0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Assets/lilToon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8.1] - 2024-10-09
### Fixed
- SDF Face Shadow direction

## [1.8.0] - 2024-10-09
### Added
- Property animations can now be taken into account when optimizing materials from external tools
Expand Down
4 changes: 4 additions & 0 deletions Assets/lilToon/CHANGELOG_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8.1] - 2024-10-09
### Fixed
- SDF顔影の処理の方向を修正

## [1.8.0] - 2024-10-09
### 追加
- 外部ツールからマテリアルの最適化を行う際にアニメーションを考慮できるようにした
Expand Down
4 changes: 2 additions & 2 deletions Assets/lilToon/Shader/Includes/lil_common_frag.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,11 @@
float4 lns = 1.0;
if(_ShadowMaskType == 2)
{
float3 faceR = mul((float3x3)LIL_MATRIX_M, float3(1.0,0.0,0.0));
float3 faceR = mul((float3x3)LIL_MATRIX_M, float3(-1.0,0.0,0.0));
float LdotR = dot(fd.L.xz, faceR.xz);
float sdf = LdotR < 0 ? shadowStrengthMask.g : shadowStrengthMask.r;

float3 faceF = mul((float3x3)LIL_MATRIX_M, float3(0.0,0.0,-1.0)).xyz;
float3 faceF = mul((float3x3)LIL_MATRIX_M, float3(0.0,0.0,1.0)).xyz;
faceF.y *= _ShadowFlatBlur;
faceF = dot(faceF,faceF) == 0 ? 0 : normalize(faceF);
float3 faceL = fd.L.xyz;
Expand Down
4 changes: 2 additions & 2 deletions Assets/lilToon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jp.lilxyzw.liltoon",
"version": "1.8.0",
"version": "1.8.1",
"displayName": "lilToon",
"description": "Feature-rich toon shader.",
"unity": "2018.1",
Expand All @@ -9,7 +9,7 @@
"licensesUrl": "https://github.com/lilxyzw/lilToon/blob/master/Assets/lilToon/LICENSE",
"license": "MIT",
"keywords": ["Toon", "Shader", "Material"],
"url" : "https://github.com/lilxyzw/lilToon/releases/download/1.8.0/jp.lilxyzw.liltoon-1.8.0.zip?",
"url" : "https://github.com/lilxyzw/lilToon/releases/download/1.8.1/jp.lilxyzw.liltoon-1.8.1.zip?",
"repo" : "https://lilxyzw.github.io/vpm-repos/vpm.json",
"legacyFolders" : {
"Assets\\lilToon" : "05d1d116436047941ad97d1b9064ee05"
Expand Down

0 comments on commit 2b3aca0

Please sign in to comment.