summaryrefslogtreecommitdiffstats
path: root/Studio/Content/Material Library/metal_mesh_fine.shader
diff options
context:
space:
mode:
Diffstat (limited to 'Studio/Content/Material Library/metal_mesh_fine.shader')
-rw-r--r--Studio/Content/Material Library/metal_mesh_fine.shader19
1 files changed, 12 insertions, 7 deletions
diff --git a/Studio/Content/Material Library/metal_mesh_fine.shader b/Studio/Content/Material Library/metal_mesh_fine.shader
index f4e2d9f..b60b1a6 100644
--- a/Studio/Content/Material Library/metal_mesh_fine.shader
+++ b/Studio/Content/Material Library/metal_mesh_fine.shader
@@ -69,7 +69,9 @@ struct layer_result
// temporary declarations
+texture_coordinate_info tmp1;
texture_coordinate_info tmp2;
+texture_coordinate_info tmp3;
vec3 tmp4;
vec3 tmp6;
vec4 tmpShadowTerm;
@@ -114,7 +116,7 @@ void computeFrontLayerColor( in vec3 normal, in vec3 lightDir, in vec3 viewDir,
layers[0].layer += tmpShadowTerm * microfacetBSDF( layers[0].tanFrame, lightDir, viewDir, lightSpecular, materialIOR, roughness, roughness, scatter_reflect );
layers[1].base += tmpShadowTerm * vec4( 0.0, 0.0, 0.0, 1.0 );
- layers[1].layer += tmpShadowTerm * diffuseReflectionBSDF( tmp6, lightDir, viewDir, lightDiffuse, 0.000000 );
+ layers[1].layer += tmpShadowTerm * diffuseReflectionBSDF( tmp6, lightDir, lightDiffuse );
#endif
}
@@ -139,7 +141,7 @@ void computeFrontLayerEnvironment( in vec3 normal, in vec3 viewDir, float aoFact
layers[1].layer += tmpShadowTerm * diffuseReflectionBSDFEnvironment( tmp6, 0.000000 ) * aoFactor;
#else
- layers[0].layer += tmpShadowTerm * sampleGlossyAniso( layers[0].tanFrame, viewDir, roughness, roughness );
+ layers[0].layer += tmpShadowTerm * sampleGlossy( layers[0].tanFrame, viewDir, roughness );
layers[1].base += tmpShadowTerm * vec4( 0.0, 0.0, 0.0, 1.0 );
layers[1].layer += tmpShadowTerm * sampleDiffuse( layers[1].tanFrame ) * aoFactor;
@@ -186,7 +188,7 @@ float computeIOR()
float evalCutout()
{
- return( fileTexture(cutout_opacity_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp2, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_linear ).mono );
+ return( fileTexture(cutout_opacity_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp1, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_linear ).mono );
}
vec3 computeNormal()
@@ -196,10 +198,13 @@ vec3 computeNormal()
void computeTemporaries()
{
- tmp2 = transformCoordinate( rotationTranslationScale( vec3( 0.000000, 0.000000, 0.000000 ), vec3( 0.000000, 0.000000, 0.000000 ), vec3( texture_tiling[0], texture_tiling[1], 1.000000 ) ), textureCoordinateInfo( texCoord0, tangent, binormal ) );
- tmp4 = fileTexture(diffuse_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp2, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_srgb ).tint;
- tmp6 = fileBumpTexture(bump_texture, bump_amount, mono_average, tmp2, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, normal );
- tmpShadowTerm = evalBakedShadowMap( texCoord0 );
+ vec3 tiling = vec3( texture_tiling[0], texture_tiling[1], 1.0);
+ tmp1 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_cutout_opacity_texture(texCoord0), tangent, binormal ) );
+ tmp2 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_bump_texture(texCoord0), tangent, binormal ) );
+ tmp3 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_diffuse_texture(texCoord0), tangent, binormal ) );
+ tmp4 = fileTexture(diffuse_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp3, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_srgb ).tint;
+ tmp6 = fileBumpTexture(bump_texture, bump_amount, mono_average, tmp2, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, normal );
+ tmpShadowTerm = evalBakedShadowMap( texCoord0 );
}
vec4 computeLayerWeights( in float alpha )