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.shader15
1 files changed, 10 insertions, 5 deletions
diff --git a/Studio/Content/Material Library/metal_mesh_fine.shader b/Studio/Content/Material Library/metal_mesh_fine.shader
index 21441f0..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;
@@ -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 )