Mostly fucking around
This commit is contained in:
parent
dbac828891
commit
2a116f230a
4 changed files with 9 additions and 7 deletions
|
@ -12,6 +12,9 @@ layout( location = 0 ) out vec3 color;
|
|||
|
||||
void main( void )
|
||||
{
|
||||
vec3 c = textureLod( u_Input , gl_FragCoord.xy / u_InputSize.xy , u_LOD ).xyz;
|
||||
color = max( vec3(0) , ( pow( c , vec3( u_FilterParams.x ) ) * u_FilterParams.y - c ) / u_FilterParams.z );
|
||||
const vec3 c = textureLod( u_Input ,
|
||||
gl_FragCoord.xy / u_InputSize.xy , u_LOD ).xyz;
|
||||
color = max( vec3( 0 ) ,
|
||||
( pow( c , vec3( u_FilterParams.x ) ) * u_FilterParams.y - c )
|
||||
/ u_FilterParams.z );
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ void main( void )
|
|||
{
|
||||
vec2 tmp = gl_FragCoord.xy / u_OutputSize;
|
||||
vec2 disp = u_Direction / u_OutputSize;
|
||||
float wt = u_Weights.x + u_Weights.y * 2 + u_Weights.z * 2 + u_Weights.w * 2;
|
||||
color = u_Weights.x * textureLod( u_InputTexture , tmp , u_SourceLOD ).xyz
|
||||
+ u_Weights.y * (
|
||||
textureLod( u_InputTexture , tmp + disp , u_SourceLOD ).xyz
|
||||
|
@ -26,5 +25,5 @@ void main( void )
|
|||
textureLod( u_InputTexture , tmp + disp * 3 , u_SourceLOD ).xyz
|
||||
+ textureLod( u_InputTexture , tmp - disp * 3 , u_SourceLOD ).xyz )
|
||||
;
|
||||
color /= wt;
|
||||
color /= u_Weights.x + 2 * ( u_Weights.y + u_Weights.z + u_Weights.w );
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ T_PBRPrecomputed PBR_Precompute(
|
|||
|
||||
float tDir = step( .99 , abs( normal.z ) ) ,
|
||||
aspect = sqrt( 1 - material.anisotropy * .9 ) ,
|
||||
rsqr = material.roughness * material.roughness;
|
||||
rsqr = M_Sqr( material.roughness );
|
||||
|
||||
vec3 tUp = mix( vec3( 0 , 0 , 1 ) , vec3( 1 , 0 , 0 ) , tDir ) ,
|
||||
tint = M_NormalizeColor( material.cAlbedo );
|
||||
|
|
|
@ -18,7 +18,7 @@ T_PBRMaterial PBRMaterials[1] = {
|
|||
// Albedo color
|
||||
vec3( .9 , 1 , .9 ) ,
|
||||
// Roughness , metallic , subsurface , anisotropy
|
||||
.25 , .5 , .9 , .9 ,
|
||||
.15 , .5 , .9 , .9 ,
|
||||
// Specular strength / tint%
|
||||
.5 , .5
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ void main( )
|
|||
|
||||
const int midx = int( r.y );
|
||||
const vec3 sunlightDir = normalize( vec3( 0 , 1 , 1 ) );
|
||||
const vec3 sunlightColor = vec3( 1 , 1 , .99 ) * .1;
|
||||
const vec3 sunlightColor = vec3( 1 , 1 , .99 ) * .05;
|
||||
const vec3 pl1Pos = vec3( 3 , 3 , 5 );
|
||||
const vec3 pl1Color = vec3( 1 , .7 , .8 );
|
||||
const float pl1Power = 20;
|
||||
|
|
Loading…
Reference in a new issue