Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this package are documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased] - 2021-09-13

### Added

### Fixed
- Fixed an incorrect direction transform from view to world space [1365187]

## [10.7.0] - 2021-07-02

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMo
{
if (conversion.to == CoordinateSpace.World)
{
transformString = string.Format("mul(UNITY_MATRIX_I_V, $precision4({0}, 1)).xyz", inputValue);
transformString = string.Format(conversionType == ConversionType.Direction ?
"mul(UNITY_MATRIX_I_V, $precision4({0}, 0)).xyz" :
"mul(UNITY_MATRIX_I_V, $precision4({0}, 1)).xyz", inputValue);
}
else if (conversion.to == CoordinateSpace.Object)
{
Expand Down