Color grading stuff - test (hardcoded)
This commit is contained in:
parent
942a4fea21
commit
af2e8eb05c
3 changed files with 12 additions and 6 deletions
|
@ -41,6 +41,12 @@ void main( void )
|
||||||
}
|
}
|
||||||
o_Color = o_Color + bloom / 2.2;
|
o_Color = o_Color + bloom / 2.2;
|
||||||
|
|
||||||
|
// Color grading test
|
||||||
|
vec3 uColorGain = vec3( .95 , 1.1 , 1.4 ) ,
|
||||||
|
uColorLift = vec3( 0 , 0 , .003 ) ,
|
||||||
|
uColorGamma = vec3( -.2 , 0.1 , .1 );
|
||||||
|
o_Color = ( o_Color * ( uColorGain - uColorLift ) ) + uColorLift;
|
||||||
|
|
||||||
// Vignette
|
// Vignette
|
||||||
vec2 vShape = pow( abs( pos * 2 - 1 ) * uVigShapeMul ,
|
vec2 vShape = pow( abs( pos * 2 - 1 ) * uVigShapeMul ,
|
||||||
vec2( uVigShapePow ) );
|
vec2( uVigShapePow ) );
|
||||||
|
@ -54,5 +60,5 @@ void main( void )
|
||||||
o_Color = o_Color / ( o_Color + 1. );
|
o_Color = o_Color / ( o_Color + 1. );
|
||||||
|
|
||||||
// Gamma
|
// Gamma
|
||||||
o_Color = pow( o_Color , vec3( 1.0 / 2.2 ) );
|
o_Color = pow( o_Color , vec3( 1 ) / ( uColorGamma + 2.2 ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ float M_Hash(
|
||||||
float M_Luminosity(
|
float M_Luminosity(
|
||||||
in vec3 color )
|
in vec3 color )
|
||||||
{
|
{
|
||||||
return dot( color , vec3( .3 , .6 , .1 ) );
|
return dot( color , vec3( .299 , .587 , .114 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3 M_NormalizeColor(
|
vec3 M_NormalizeColor(
|
||||||
|
|
|
@ -14,16 +14,16 @@ T_BPMaterial BPMaterials[1] = {
|
||||||
T_PBRMaterial PBRMaterials[1] = {
|
T_PBRMaterial PBRMaterials[1] = {
|
||||||
{
|
{
|
||||||
// Albedo color
|
// Albedo color
|
||||||
vec3( 1 , 1 , .4 ) ,
|
vec3( 1 , 1 , 1 ) ,
|
||||||
// Roughness , metallic , subsurface , anisotropy
|
// Roughness , metallic , subsurface , anisotropy
|
||||||
.4 , .7 , 1 , .1 ,
|
.5 , .5 , 0 , 0 ,
|
||||||
// Specular strength / tint%
|
// Specular strength / tint%
|
||||||
.5 , .5
|
.5 , .5
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
vec3 Glow[1] = {
|
vec3 Glow[1] = {
|
||||||
vec3( 2 , .4 , 5 ) * 4
|
vec3( .95 , .8 , 1 ) * 5
|
||||||
};
|
};
|
||||||
|
|
||||||
void mapMaterial(
|
void mapMaterial(
|
||||||
|
@ -65,7 +65,7 @@ void main( )
|
||||||
int( u_Render.x ) , u_Render.y ,
|
int( u_Render.x ) , u_Render.y ,
|
||||||
u_Render.z , .001 , u_Render.w );
|
u_Render.z , .001 , u_Render.w );
|
||||||
vec3 hitPos = u_CamPos + rayDir * r.x;
|
vec3 hitPos = u_CamPos + rayDir * r.x;
|
||||||
const vec3 background = vec3( .01 );
|
const vec3 background = vec3( .005 );
|
||||||
|
|
||||||
vec3 bc = background;
|
vec3 bc = background;
|
||||||
if ( r.y >= 0. ) {
|
if ( r.y >= 0. ) {
|
||||||
|
|
Loading…
Reference in a new issue