狠狠撸

狠狠撸Share a Scribd company logo
???
Shader Study

POST PROCESSING IN COLOR
??
? Flimic Tone Mapping
? Color Grading

? Image Sharpening
? Color Correction
? Photo Filter
Flimic Tone Mapping
? John Hable? Unchated2 HDR Lighting ??

???? ??? ??
? Flim??? ?? Curve? ? ?? ??? ?
???? ??? ??
? ?????? Reinhard??? ???? ?
?????? ????, ??? ??? ?
?? ??? ? ??? ??? ??
Flimic Tone Mapping
A = Shoulder Strength
B = Linear Strength
C = Linear Angle
D = Toe Strength
E = Toe Numerator
F = Toe Denominator
Note: E/F = Toe Angle

?
?

John Hable? Blog? ???, Fixed ? ????? ??.
Gamma ??? ????? ?? (pow(x, 1/2.2))
Flimic Tone Mapping
Flimic Tone Mapping
Color Grading

? ?? (HDR to LDR ??) ? ?? ?? ? ?? (LDR color to color ??) ??? ??
http://udn.epicgames.com/Three/ColorGradingKR.html

http://ttmayrin.tistory.com/34 Color Grading by LookUpTexture (?? ???? by LUT)
Color Grading
? ?? ???? RGB?? ???? UV??? ??

? ??? Color? ??? ?? ??

? ???? 16x16x16 3DTexture? ?? ???? tex3D??

?? ColorGrading? ??

? LUT? ??? ColorGrading? Post Effect??? ?

?? ?? ?? ??? ?? ???? ?????
??? ??

? Actor? ShaderCode???? LUT?? ??? ????

? ??

? ?? ??? ????? LUT? ??? ??? ?

?? ?? ???? ???, ???? ???? ?
?? ? ??
? ??? ???? ????? ??? ??
Color Grading
?? LUT ??? 256x16
16x16x16 3D ???? ???? ?? ??

1. ColorGrading? ??? ????? ???? ????? ???
2. ??? ?? LUT? ?? ???
3. ???? ?? ???? ??? ??? ??? ???? ??
- ??? ??? ?? ??? LUT? ?? ??????? ?
4. ??? ??????? LUT? ?? ??
GrayScale? LUT
256x16 LUT? ?? ShaderCode from Unreal3
float3 CalcLUT( sampler InLUT, float3 InColor )
{
// requires a volume texture 16x16x16 unwrapped in a 2d texture 256x16
// can be optimized by using a volume texture
float2 Offset = float2(0.5f / 256.0f, 0.5f / 16.0f);
float Scale = 15.0f / 16.0f;

// Also consider blur value in the blur buffer written by translucency
float IntB = floor(InColor.b * 14.9999f) / 16.0f;
float FracB = InColor.b * 15.0f - IntB * 16.0f;

float U = IntB + InColor.r * Scale / 16.0f;
float V = InColor.g * Scale;

float3 RG0 = tex2D( InLUT, Offset + float2(U
, V) ).rgb;
float3 RG1 = tex2D( InLUT, Offset + float2(U + 1.0f / 16.0f, V) ).rgb;

return lerp( RG0, RG1, FracB );
}

16x16x16 3D VolumeTexture? ??? ??
float3 CalcLUT( sampler InLUT, float3 InColor )
{
return tex3D( InLUT, InColor * 15.f / 16.f + 0.5f / 16.f ).rgb;
}
Image Sharpening

???? ???? ?? ??
Simply lerp between low-res blurred image with original image by a ratio bigger than 1
Sharp = lerp(blurred, orig, bigger than 1 ratio)
vector rcpres;
float4 lSharp(in float2 Tex : TEXCOORD) : COLOR0
{
float4 inColor = tex2D(s0, Tex);
float4 blur = inColor;

blur += tex2D(s0, float2(Tex.x, Tex.y+rcpres.y)) * 0.25;
blur += tex2D(s0, float2(Tex.x, Tex.y-rcpres.y)) * 0.25;
blur += tex2D(s0, float2(Tex.x+rcpres.x, Tex.y)) * 0.25;
blur += tex2D(s0, float2(Tex.x-rcpres.x, Tex.y)) * 0.25;
blur += tex2D(s0, float2(Tex.x-rcpres.x, Tex.y+rcpres.y)) * 0.25;
blur += tex2D(s0, float2(Tex.x-rcpres.x, Tex.y-rcpres.y)) * 0.25;
blur += tex2D(s0, float2(Tex.x+rcpres.x, Tex.y+rcpres.y)) * 0.25;
blur += tex2D(s0, float2(Tex.x+rcpres.x, Tex.y-rcpres.y)) * 0.25;
blur /= 3;

float4 final = lerp(blur,inColor, 3);
return final;
}
Color Correction
? Color range based on Euclidian distance
? ColorRange = saturate(1 - length( src - col.xyz) );

? ????? CMYK ???? ??
? c = lerp( c, clamp(c + dst_c, -1, 1), ColorRange);

? ????? ??? ?? ??? ??
? Orig =lerp( Orig, CMYKtoRGB( c), ColorRange);
Color Correction
Photo Filter
? ???? ???? ?? ???? ???? ??
? ????? ?? ??
? cMood = lerp(0, cMood, saturate( fLum * 2.0 ) );
? cMood = lerp(cMood, 1, saturate( fLum - 0.5 ) * 2.0 );

? ?? ??? ??(luminance)? ??? ??(user ratio)

????? ??? ??? ?? ???? ??
? final= lerp(cScreen, cMood , saturate( fLum * fRatio));
float fRatio = 0.25;
float moodR = 0.5;
float moodG = 0.4;
float moodB = 0.25; //default is a mild orange
float4 colorMood(in float2 Tex : TEXCOORD) : COLOR0
{
float4 cScreen = tex2D(s0, Tex);
float4 cMood = 1;
cMood.r = moodR;
cMood.g = moodG;
cMood.b = moodB;
float fLum = ( cScreen.r + cScreen.g + cScreen.b ) / 3;

cMood = lerp(0, cMood, saturate(fLum * 2.0));
cMood = lerp(cMood, 1, saturate(fLum - 0.5) * 2.0);
float4 final = lerp(cScreen, cMood, saturate(fLum * fRatio));
return final;
}
Post processing in_color
Post processing in_color
Post processing in_color
Post processing in_color

More Related Content

What's hot (20)

Unity Surface Shader for Artist 02
Unity Surface Shader for Artist 02Unity Surface Shader for Artist 02
Unity Surface Shader for Artist 02
SangYun Yi
?
Unity Surface Shader for Artist 03
Unity Surface Shader for Artist 03Unity Surface Shader for Artist 03
Unity Surface Shader for Artist 03
SangYun Yi
?
??????? 3 d ?? ?? ?? ps4
??????? 3 d ?? ?? ?? ps4??????? 3 d ?? ?? ?? ps4
??????? 3 d ?? ?? ?? ps4
?? ?
?
Motion blur
Motion blurMotion blur
Motion blur
changehee lee
?
[0107 ???] ?? ??? hdr? ???
[0107 ???] ?? ??? hdr? ???[0107 ???] ?? ??? hdr? ???
[0107 ???] ?? ??? hdr? ???
MinGeun Park
?
[Ndc12] ??? ???? hdr? ??? ???
[Ndc12] ??? ???? hdr? ??? ???[Ndc12] ??? ???? hdr? ??? ???
[Ndc12] ??? ???? hdr? ??? ???
MinGeun Park
?
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...
?? ?
?
Game Visual Art Technologies
Game Visual Art TechnologiesGame Visual Art Technologies
Game Visual Art Technologies
SangYun Yi
?
????4 ???? ??1 ???&???
????4 ???? ??1 ???&???????4 ???? ??1 ???&???
????4 ???? ??1 ???&???
Dae Hyek KIM
?
Unity Surface Shader for Artist 04
Unity Surface Shader for Artist 04Unity Surface Shader for Artist 04
Unity Surface Shader for Artist 04
SangYun Yi
?
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
?? ?
?
[???] 3 d??? ?????_3 ????
[???] 3 d??? ?????_3 ????[???] 3 d??? ?????_3 ????
[???] 3 d??? ?????_3 ????
MinGeun Park
?
Ndc2010 ??? ????2 ??? ??? ??
Ndc2010 ???   ????2 ??? ??? ??Ndc2010 ???   ????2 ??? ??? ??
Ndc2010 ??? ????2 ??? ??? ??
henjeon
?
Ndc17 - ??? ?????? ?? ???? ???
Ndc17 - ??? ?????? ?? ???? ???Ndc17 - ??? ?????? ?? ???? ???
Ndc17 - ??? ?????? ?? ???? ???
Dae Hyek KIM
?
[KGC2014] ????? ?? ????? ??
[KGC2014] ????? ?? ????? ?? [KGC2014] ????? ?? ????? ??
[KGC2014] ????? ?? ????? ??
JiUng Choi
?
Modern gpu optimize
Modern gpu optimizeModern gpu optimize
Modern gpu optimize
ozlael ozlael
?
Gamma and linear color-space
Gamma and linear color-spaceGamma and linear color-space
Gamma and linear color-space
?? ?
?
SGL : ????? 3D ??? ??
SGL : ????? 3D ??? ??SGL : ????? 3D ??? ??
SGL : ????? 3D ??? ??
SUNGCHEOL KIM
?
Unity Surface Shader for Artist 02
Unity Surface Shader for Artist 02Unity Surface Shader for Artist 02
Unity Surface Shader for Artist 02
SangYun Yi
?
Unity Surface Shader for Artist 03
Unity Surface Shader for Artist 03Unity Surface Shader for Artist 03
Unity Surface Shader for Artist 03
SangYun Yi
?
??????? 3 d ?? ?? ?? ps4
??????? 3 d ?? ?? ?? ps4??????? 3 d ?? ?? ?? ps4
??????? 3 d ?? ?? ?? ps4
?? ?
?
[0107 ???] ?? ??? hdr? ???
[0107 ???] ?? ??? hdr? ???[0107 ???] ?? ??? hdr? ???
[0107 ???] ?? ??? hdr? ???
MinGeun Park
?
[Ndc12] ??? ???? hdr? ??? ???
[Ndc12] ??? ???? hdr? ??? ???[Ndc12] ??? ???? hdr? ??? ???
[Ndc12] ??? ???? hdr? ??? ???
MinGeun Park
?
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Comput...
?? ?
?
Game Visual Art Technologies
Game Visual Art TechnologiesGame Visual Art Technologies
Game Visual Art Technologies
SangYun Yi
?
????4 ???? ??1 ???&???
????4 ???? ??1 ???&???????4 ???? ??1 ???&???
????4 ???? ??1 ???&???
Dae Hyek KIM
?
Unity Surface Shader for Artist 04
Unity Surface Shader for Artist 04Unity Surface Shader for Artist 04
Unity Surface Shader for Artist 04
SangYun Yi
?
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
[shaderx6] 3.7 Robust Order-Independent Transparency via Reverse Depth Peelin...
?? ?
?
[???] 3 d??? ?????_3 ????
[???] 3 d??? ?????_3 ????[???] 3 d??? ?????_3 ????
[???] 3 d??? ?????_3 ????
MinGeun Park
?
Ndc2010 ??? ????2 ??? ??? ??
Ndc2010 ???   ????2 ??? ??? ??Ndc2010 ???   ????2 ??? ??? ??
Ndc2010 ??? ????2 ??? ??? ??
henjeon
?
Ndc17 - ??? ?????? ?? ???? ???
Ndc17 - ??? ?????? ?? ???? ???Ndc17 - ??? ?????? ?? ???? ???
Ndc17 - ??? ?????? ?? ???? ???
Dae Hyek KIM
?
[KGC2014] ????? ?? ????? ??
[KGC2014] ????? ?? ????? ?? [KGC2014] ????? ?? ????? ??
[KGC2014] ????? ?? ????? ??
JiUng Choi
?
Gamma and linear color-space
Gamma and linear color-spaceGamma and linear color-space
Gamma and linear color-space
?? ?
?

Viewers also liked (20)

Compute shader DX11
Compute shader DX11Compute shader DX11
Compute shader DX11
?? ?
?
Cheap realisticskinshading kor
Cheap realisticskinshading korCheap realisticskinshading kor
Cheap realisticskinshading kor
?? ?
?
(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2
(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2
(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2
gongwujugongwuju
?
工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2
工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2
工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2
gongwujugongwuju
?
使用管理科業務報告 1102
使用管理科業務報告 1102使用管理科業務報告 1102
使用管理科業務報告 1102
gongwujugongwuju
?
??????????????
????????????????????????????
??????????????
jumjaP
?
NTU & NTUST Tangible Interaction Design Project Proposal 1
NTU & NTUST Tangible Interaction Design Project Proposal 1NTU & NTUST Tangible Interaction Design Project Proposal 1
NTU & NTUST Tangible Interaction Design Project Proposal 1
Han-Wei Liao
?
第47次局务会议简报1123(简版)
第47次局务会议简报1123(简版)第47次局务会议简报1123(简版)
第47次局务会议简报1123(简版)
gongwujugongwuju
?
Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...
Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...
Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...
Lenka Kri?anová
?
Lecoconut pitch
Lecoconut pitchLecoconut pitch
Lecoconut pitch
jjcarlsen
?
0802局务会议报告--使管
0802局务会议报告--使管0802局务会议报告--使管
0802局务会议报告--使管
gongwujugongwuju
?
2012南瀛绿都心迎春花卉展
2012南瀛绿都心迎春花卉展2012南瀛绿都心迎春花卉展
2012南瀛绿都心迎春花卉展
gongwujugongwuju
?
局務會議業務報告 養護工程二科530
局務會議業務報告 養護工程二科530局務會議業務報告 養護工程二科530
局務會議業務報告 養護工程二科530
gongwujugongwuju
?
101工务局记者会(0323)
101工务局记者会(0323)101工务局记者会(0323)
101工务局记者会(0323)
gongwujugongwuju
?
Ml seminar ppt 2014
Ml seminar ppt 2014Ml seminar ppt 2014
Ml seminar ppt 2014
nurulhuda41
?
100.10.05 公園一科 科務報告
100.10.05 公園一科 科務報告100.10.05 公園一科 科務報告
100.10.05 公園一科 科務報告
gongwujugongwuju
?
Who Goes to Hell? Hitler? Atheists?
Who Goes to Hell? Hitler? Atheists?Who Goes to Hell? Hitler? Atheists?
Who Goes to Hell? Hitler? Atheists?
SwordSharp Studios
?
局務會議業務報告 養護工程二科101.2.1
局務會議業務報告 養護工程二科101.2.1局務會議業務報告 養護工程二科101.2.1
局務會議業務報告 養護工程二科101.2.1
gongwujugongwuju
?
不违背职务行贿罪介绍100.08.26
不违背职务行贿罪介绍100.08.26不违背职务行贿罪介绍100.08.26
不违背职务行贿罪介绍100.08.26
gongwujugongwuju
?
Compute shader DX11
Compute shader DX11Compute shader DX11
Compute shader DX11
?? ?
?
Cheap realisticskinshading kor
Cheap realisticskinshading korCheap realisticskinshading kor
Cheap realisticskinshading kor
?? ?
?
(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2
(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2
(101.08.15日局務會議)2013臺南百花祭先期籌畫報告 2
gongwujugongwuju
?
工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2
工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2
工务局100年度追加预算及101年度预算工作项目及工作内容業務報告 100.11.25 2
gongwujugongwuju
?
使用管理科業務報告 1102
使用管理科業務報告 1102使用管理科業務報告 1102
使用管理科業務報告 1102
gongwujugongwuju
?
??????????????
????????????????????????????
??????????????
jumjaP
?
NTU & NTUST Tangible Interaction Design Project Proposal 1
NTU & NTUST Tangible Interaction Design Project Proposal 1NTU & NTUST Tangible Interaction Design Project Proposal 1
NTU & NTUST Tangible Interaction Design Project Proposal 1
Han-Wei Liao
?
第47次局务会议简报1123(简版)
第47次局务会议简报1123(简版)第47次局务会议简报1123(简版)
第47次局务会议简报1123(简版)
gongwujugongwuju
?
Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...
Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...
Prezentácia - ?tudentská spolo?nos? STROM (SO? hotelov?ch slu?ieb a obchodu, ...
Lenka Kri?anová
?
Lecoconut pitch
Lecoconut pitchLecoconut pitch
Lecoconut pitch
jjcarlsen
?
0802局务会议报告--使管
0802局务会议报告--使管0802局务会议报告--使管
0802局务会议报告--使管
gongwujugongwuju
?
2012南瀛绿都心迎春花卉展
2012南瀛绿都心迎春花卉展2012南瀛绿都心迎春花卉展
2012南瀛绿都心迎春花卉展
gongwujugongwuju
?
局務會議業務報告 養護工程二科530
局務會議業務報告 養護工程二科530局務會議業務報告 養護工程二科530
局務會議業務報告 養護工程二科530
gongwujugongwuju
?
Ml seminar ppt 2014
Ml seminar ppt 2014Ml seminar ppt 2014
Ml seminar ppt 2014
nurulhuda41
?
100.10.05 公園一科 科務報告
100.10.05 公園一科 科務報告100.10.05 公園一科 科務報告
100.10.05 公園一科 科務報告
gongwujugongwuju
?
Who Goes to Hell? Hitler? Atheists?
Who Goes to Hell? Hitler? Atheists?Who Goes to Hell? Hitler? Atheists?
Who Goes to Hell? Hitler? Atheists?
SwordSharp Studios
?
局務會議業務報告 養護工程二科101.2.1
局務會議業務報告 養護工程二科101.2.1局務會議業務報告 養護工程二科101.2.1
局務會議業務報告 養護工程二科101.2.1
gongwujugongwuju
?
不违背职务行贿罪介绍100.08.26
不违背职务行贿罪介绍100.08.26不违背职务行贿罪介绍100.08.26
不违背职务行贿罪介绍100.08.26
gongwujugongwuju
?

Similar to Post processing in_color (11)

[Shader study] Color control (2014.05.12)
[Shader study] Color control (2014.05.12)[Shader study] Color control (2014.05.12)
[Shader study] Color control (2014.05.12)
??
?
[0312 ???] good bye dx9
[0312 ???] good bye dx9[0312 ???] good bye dx9
[0312 ???] good bye dx9
?? ?
?
Ndc11 ???_hdr
Ndc11 ???_hdrNdc11 ???_hdr
Ndc11 ???_hdr
changehee lee
?
Volumetric Fog
Volumetric FogVolumetric Fog
Volumetric Fog
Bongseok Cho
?
Reflective Shadow Maps
Reflective Shadow MapsReflective Shadow Maps
Reflective Shadow Maps
Bongseok Cho
?
Uncharted4 part1
Uncharted4 part1Uncharted4 part1
Uncharted4 part1
Yong-jun Choi
?
Implements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture ArrayImplements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture Array
YEONG-CHEON YOU
?
[IGC2018] ???? ??? - ??? ?? ????
[IGC2018] ???? ??? - ??? ?? ????[IGC2018] ???? ??? - ??? ?? ????
[IGC2018] ???? ??? - ??? ?? ????
? ??
?
NDC11_?????
NDC11_?????NDC11_?????
NDC11_?????
noerror
?
[Shader study] Color control (2014.05.12)
[Shader study] Color control (2014.05.12)[Shader study] Color control (2014.05.12)
[Shader study] Color control (2014.05.12)
??
?
[0312 ???] good bye dx9
[0312 ???] good bye dx9[0312 ???] good bye dx9
[0312 ???] good bye dx9
?? ?
?
Reflective Shadow Maps
Reflective Shadow MapsReflective Shadow Maps
Reflective Shadow Maps
Bongseok Cho
?
Implements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture ArrayImplements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture Array
YEONG-CHEON YOU
?
[IGC2018] ???? ??? - ??? ?? ????
[IGC2018] ???? ??? - ??? ?? ????[IGC2018] ???? ??? - ??? ?? ????
[IGC2018] ???? ??? - ??? ?? ????
? ??
?
NDC11_?????
NDC11_?????NDC11_?????
NDC11_?????
noerror
?

More from ?? ? (13)

Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...
Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...
Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...
?? ?
?
PowerVR Low Level GLSL Optimisation
PowerVR Low Level GLSL Optimisation PowerVR Low Level GLSL Optimisation
PowerVR Low Level GLSL Optimisation
?? ?
?
?????? 2 ray marching???? ?? ??
?????? 2 ray marching???? ?? ???????? 2 ray marching???? ?? ??
?????? 2 ray marching???? ?? ??
?? ?
?
?? ?? 3?? ????
?? ?? 3?? ?????? ?? 3?? ????
?? ?? 3?? ????
?? ?
?
「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???
「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???
「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???
?? ?
?
Valient killzone ps4 lighting
Valient killzone ps4 lightingValient killzone ps4 lighting
Valient killzone ps4 lighting
?? ?
?
??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)
??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)
??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)
?? ?
?
Microfacet brdf
Microfacet brdfMicrofacet brdf
Microfacet brdf
?? ?
?
??????? 3 d?? ?? ??「gravity daze」???? ??
??????? 3 d?? ?? ??「gravity daze」???? ????????? 3 d?? ?? ??「gravity daze」???? ??
??????? 3 d?? ?? ??「gravity daze」???? ??
?? ?
?
Wrapped diffuse
Wrapped diffuseWrapped diffuse
Wrapped diffuse
?? ?
?
3D Engine Tools with C++/CLR
3D Engine Tools with C++/CLR3D Engine Tools with C++/CLR
3D Engine Tools with C++/CLR
?? ?
?
Ceh
CehCeh
Ceh
?? ?
?
Deferred decal
Deferred decalDeferred decal
Deferred decal
?? ?
?
Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...
Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...
Siggraph15 A Novel Sampling Algorithm for Fast and Stable Real-Time Volume Re...
?? ?
?
PowerVR Low Level GLSL Optimisation
PowerVR Low Level GLSL Optimisation PowerVR Low Level GLSL Optimisation
PowerVR Low Level GLSL Optimisation
?? ?
?
?????? 2 ray marching???? ?? ??
?????? 2 ray marching???? ?? ???????? 2 ray marching???? ?? ??
?????? 2 ray marching???? ?? ??
?? ?
?
?? ?? 3?? ????
?? ?? 3?? ?????? ?? 3?? ????
?? ?? 3?? ????
?? ?
?
「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???
「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???
「??? ??? ?? ???? 2012」「Agni's Philosophy」???? ???
?? ?
?
Valient killzone ps4 lighting
Valient killzone ps4 lightingValient killzone ps4 lighting
Valient killzone ps4 lighting
?? ?
?
??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)
??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)
??, ????,???, ???? ???: Just Cause 2 ???? ?? ??? (GPU Pro)
?? ?
?
Microfacet brdf
Microfacet brdfMicrofacet brdf
Microfacet brdf
?? ?
?
??????? 3 d?? ?? ??「gravity daze」???? ??
??????? 3 d?? ?? ??「gravity daze」???? ????????? 3 d?? ?? ??「gravity daze」???? ??
??????? 3 d?? ?? ??「gravity daze」???? ??
?? ?
?
Wrapped diffuse
Wrapped diffuseWrapped diffuse
Wrapped diffuse
?? ?
?
3D Engine Tools with C++/CLR
3D Engine Tools with C++/CLR3D Engine Tools with C++/CLR
3D Engine Tools with C++/CLR
?? ?
?
Deferred decal
Deferred decalDeferred decal
Deferred decal
?? ?
?

Post processing in_color

  • 2. ?? ? Flimic Tone Mapping ? Color Grading ? Image Sharpening ? Color Correction ? Photo Filter
  • 3. Flimic Tone Mapping ? John Hable? Unchated2 HDR Lighting ?? ???? ??? ?? ? Flim??? ?? Curve? ? ?? ??? ? ???? ??? ?? ? ?????? Reinhard??? ???? ? ?????? ????, ??? ??? ? ?? ??? ? ??? ??? ??
  • 4. Flimic Tone Mapping A = Shoulder Strength B = Linear Strength C = Linear Angle D = Toe Strength E = Toe Numerator F = Toe Denominator Note: E/F = Toe Angle ? ? John Hable? Blog? ???, Fixed ? ????? ??. Gamma ??? ????? ?? (pow(x, 1/2.2))
  • 7. Color Grading ? ?? (HDR to LDR ??) ? ?? ?? ? ?? (LDR color to color ??) ??? ?? http://udn.epicgames.com/Three/ColorGradingKR.html http://ttmayrin.tistory.com/34 Color Grading by LookUpTexture (?? ???? by LUT)
  • 8. Color Grading ? ?? ???? RGB?? ???? UV??? ?? ? ??? Color? ??? ?? ?? ? ???? 16x16x16 3DTexture? ?? ???? tex3D?? ?? ColorGrading? ?? ? LUT? ??? ColorGrading? Post Effect??? ? ?? ?? ?? ??? ?? ???? ????? ??? ?? ? Actor? ShaderCode???? LUT?? ??? ???? ? ?? ? ?? ??? ????? LUT? ??? ??? ? ?? ?? ???? ???, ???? ???? ? ?? ? ?? ? ??? ???? ????? ??? ??
  • 9. Color Grading ?? LUT ??? 256x16 16x16x16 3D ???? ???? ?? ?? 1. ColorGrading? ??? ????? ???? ????? ??? 2. ??? ?? LUT? ?? ???
  • 10. 3. ???? ?? ???? ??? ??? ??? ???? ?? - ??? ??? ?? ??? LUT? ?? ??????? ? 4. ??? ??????? LUT? ?? ?? GrayScale? LUT
  • 11. 256x16 LUT? ?? ShaderCode from Unreal3 float3 CalcLUT( sampler InLUT, float3 InColor ) { // requires a volume texture 16x16x16 unwrapped in a 2d texture 256x16 // can be optimized by using a volume texture float2 Offset = float2(0.5f / 256.0f, 0.5f / 16.0f); float Scale = 15.0f / 16.0f; // Also consider blur value in the blur buffer written by translucency float IntB = floor(InColor.b * 14.9999f) / 16.0f; float FracB = InColor.b * 15.0f - IntB * 16.0f; float U = IntB + InColor.r * Scale / 16.0f; float V = InColor.g * Scale; float3 RG0 = tex2D( InLUT, Offset + float2(U , V) ).rgb; float3 RG1 = tex2D( InLUT, Offset + float2(U + 1.0f / 16.0f, V) ).rgb; return lerp( RG0, RG1, FracB ); } 16x16x16 3D VolumeTexture? ??? ?? float3 CalcLUT( sampler InLUT, float3 InColor ) { return tex3D( InLUT, InColor * 15.f / 16.f + 0.5f / 16.f ).rgb; }
  • 12. Image Sharpening ???? ???? ?? ?? Simply lerp between low-res blurred image with original image by a ratio bigger than 1 Sharp = lerp(blurred, orig, bigger than 1 ratio)
  • 13. vector rcpres; float4 lSharp(in float2 Tex : TEXCOORD) : COLOR0 { float4 inColor = tex2D(s0, Tex); float4 blur = inColor; blur += tex2D(s0, float2(Tex.x, Tex.y+rcpres.y)) * 0.25; blur += tex2D(s0, float2(Tex.x, Tex.y-rcpres.y)) * 0.25; blur += tex2D(s0, float2(Tex.x+rcpres.x, Tex.y)) * 0.25; blur += tex2D(s0, float2(Tex.x-rcpres.x, Tex.y)) * 0.25; blur += tex2D(s0, float2(Tex.x-rcpres.x, Tex.y+rcpres.y)) * 0.25; blur += tex2D(s0, float2(Tex.x-rcpres.x, Tex.y-rcpres.y)) * 0.25; blur += tex2D(s0, float2(Tex.x+rcpres.x, Tex.y+rcpres.y)) * 0.25; blur += tex2D(s0, float2(Tex.x+rcpres.x, Tex.y-rcpres.y)) * 0.25; blur /= 3; float4 final = lerp(blur,inColor, 3); return final; }
  • 14. Color Correction ? Color range based on Euclidian distance ? ColorRange = saturate(1 - length( src - col.xyz) ); ? ????? CMYK ???? ?? ? c = lerp( c, clamp(c + dst_c, -1, 1), ColorRange); ? ????? ??? ?? ??? ?? ? Orig =lerp( Orig, CMYKtoRGB( c), ColorRange);
  • 16. Photo Filter ? ???? ???? ?? ???? ???? ?? ? ????? ?? ?? ? cMood = lerp(0, cMood, saturate( fLum * 2.0 ) ); ? cMood = lerp(cMood, 1, saturate( fLum - 0.5 ) * 2.0 ); ? ?? ??? ??(luminance)? ??? ??(user ratio) ????? ??? ??? ?? ???? ?? ? final= lerp(cScreen, cMood , saturate( fLum * fRatio));
  • 17. float fRatio = 0.25; float moodR = 0.5; float moodG = 0.4; float moodB = 0.25; //default is a mild orange float4 colorMood(in float2 Tex : TEXCOORD) : COLOR0 { float4 cScreen = tex2D(s0, Tex); float4 cMood = 1; cMood.r = moodR; cMood.g = moodG; cMood.b = moodB; float fLum = ( cScreen.r + cScreen.g + cScreen.b ) / 3; cMood = lerp(0, cMood, saturate(fLum * 2.0)); cMood = lerp(cMood, 1, saturate(fLum - 0.5) * 2.0); float4 final = lerp(cScreen, cMood, saturate(fLum * fRatio)); return final; }