-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
519 additions
and
189 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
60 changes: 60 additions & 0 deletions
60
Assets/Effekseer/Materials/EffekseerShader_Linear_sRGB.cginc
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#ifndef LINEAR_SRGB_FX | ||
#define LINEAR_SRGB_FX | ||
|
||
#define FLT_EPSILON 1.192092896e-07f | ||
|
||
float3 PositivePow(float3 base, float3 power) | ||
{ | ||
return pow(max(abs(base), float3(FLT_EPSILON, FLT_EPSILON, FLT_EPSILON)), power); | ||
} | ||
|
||
// based on http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html?m=1 | ||
float3 SRGBToLinear(float3 c) | ||
{ | ||
return min(c, c * (c * (c * 0.305306011 + 0.682171111) + 0.012522878)); | ||
} | ||
|
||
float4 SRGBToLinear(float4 c) | ||
{ | ||
return float4(SRGBToLinear(c.rgb), c.a); | ||
} | ||
|
||
float3 LinearToSRGB(float3 c) | ||
{ | ||
return max(1.055 * PositivePow(c, 0.416666667) - 0.055, 0.0); | ||
} | ||
|
||
float4 LinearToSRGB(float4 c) | ||
{ | ||
return float4(LinearToSRGB(c.rgb), c.a); | ||
} | ||
|
||
float4 ConvertFromSRGBTexture(float4 c, bool isValid) | ||
{ | ||
#if defined(UNITY_COLORSPACE_GAMMA) | ||
return c; | ||
#else | ||
if (!isValid) | ||
{ | ||
return c; | ||
} | ||
|
||
return LinearToSRGB(c); | ||
#endif | ||
} | ||
|
||
float4 ConvertToScreen(float4 c, bool isValid) | ||
{ | ||
#if defined(UNITY_COLORSPACE_GAMMA) | ||
return c; | ||
#else | ||
if (!isValid) | ||
{ | ||
return c; | ||
} | ||
|
||
return SRGBToLinear(c); | ||
#endif | ||
} | ||
|
||
#endif |
9 changes: 9 additions & 0 deletions
9
Assets/Effekseer/Materials/EffekseerShader_Linear_sRGB.cginc.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file modified
BIN
+68 KB
(100%)
Assets/Effekseer/Plugins/Android/libs/arm64-v8a/libEffekseerUnity.so
Binary file not shown.
Binary file modified
BIN
+64 KB
(100%)
Assets/Effekseer/Plugins/Android/libs/armeabi-v7a/libEffekseerUnity.so
Binary file not shown.
Binary file modified
BIN
+64 KB
(100%)
Assets/Effekseer/Plugins/Android/libs/x86/libEffekseerUnity.so
Binary file not shown.
Binary file modified
BIN
+64.9 KB
(100%)
Assets/Effekseer/Plugins/EffekseerUnity.bundle/Contents/MacOS/EffekseerUnity
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 14b4767e3be63d246ac675d4f9c0d467, type: 3} | ||
m_Name: EffekseerDependentAssets | ||
m_EditorClassIdentifier: | ||
texture2DArrayBlitMaterial: {fileID: 4800000, guid: 67d08a86aa6a44b41bf877601419e9d7, | ||
type: 3} | ||
texture2DBlitMaterial: {fileID: 4800000, guid: 481306851e1e5834bb2c03a0fb529629, | ||
type: 3} | ||
grabDepthShader: {fileID: 4800000, guid: 90ee1bc0a4dae04408b460d655b419ef, type: 3} | ||
fixedShader: {fileID: 4800000, guid: addc52f57a6457a41952f47196de99d8, type: 3} | ||
fakeMaterial: {fileID: 4800000, guid: 7c7fc95c6efbe1149b2f9f4747030f6e, type: 3} |
8 changes: 8 additions & 0 deletions
8
Assets/Effekseer/Resources/EffekseerDependentAssets.asset.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.