ReplaceHueShader Material#46
Open
GlitchedReme wants to merge 2 commits into
Open
Conversation
… creation methods
…terial and CreateUnmodulatedHsvShaderMaterial
Owner
|
共享 material 的问题在于如果有人进行属性修改会影响所有人 老 api 被静默修改了语义,可能会影响部分 mod 的实际工作效果 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 概要
CreateReplaceHueShaderMaterial以替代CreateRgbShaderMaterial,并添加一个亮度参数可供调整UnmodulatedHsvShaderMaterial只创建一个实例Why / 背景与动机
CreateRgbShaderMaterial只是使用yiq偏移基于原始卡框换色,这对于原始红色卡框也许有一定作用,但无法作用其他色调的图片。CreateReplaceHueShaderMaterial新建了一个shader,保留目标图片的饱和度、明度数值并直接对色调进行替换,填入颜色基本就是所写颜色,同时对较暗的颜色提供一定的亮度补偿。可传入目标颜色和自定义亮度增益制作更丰富的颜色。What changed / 变更点
Notes / 备注