From 2b3aca0635c29749f19708983e872bb73edc4aef Mon Sep 17 00:00:00 2001 From: lilxyzw Date: Wed, 9 Oct 2024 23:45:13 +0900 Subject: [PATCH] fix: sdf direction --- Assets/lilToon/CHANGELOG.md | 4 ++++ Assets/lilToon/CHANGELOG_JP.md | 4 ++++ Assets/lilToon/Shader/Includes/lil_common_frag.hlsl | 4 ++-- Assets/lilToon/package.json | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Assets/lilToon/CHANGELOG.md b/Assets/lilToon/CHANGELOG.md index 8353ac15..35d8eeb6 100644 --- a/Assets/lilToon/CHANGELOG.md +++ b/Assets/lilToon/CHANGELOG.md @@ -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 diff --git a/Assets/lilToon/CHANGELOG_JP.md b/Assets/lilToon/CHANGELOG_JP.md index 555db9a7..ea39d7f8 100644 --- a/Assets/lilToon/CHANGELOG_JP.md +++ b/Assets/lilToon/CHANGELOG_JP.md @@ -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 ### 追加 - 外部ツールからマテリアルの最適化を行う際にアニメーションを考慮できるようにした diff --git a/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl b/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl index 247f4242..5cd20c31 100644 --- a/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl +++ b/Assets/lilToon/Shader/Includes/lil_common_frag.hlsl @@ -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; diff --git a/Assets/lilToon/package.json b/Assets/lilToon/package.json index 210fc434..2108161d 100644 --- a/Assets/lilToon/package.json +++ b/Assets/lilToon/package.json @@ -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", @@ -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"