summaryrefslogtreecommitdiffstats
path: root/Studio/Content/Material Library/carbon_fiber_emissive.shader
diff options
context:
space:
mode:
Diffstat (limited to 'Studio/Content/Material Library/carbon_fiber_emissive.shader')
-rw-r--r--Studio/Content/Material Library/carbon_fiber_emissive.shader26
1 files changed, 14 insertions, 12 deletions
diff --git a/Studio/Content/Material Library/carbon_fiber_emissive.shader b/Studio/Content/Material Library/carbon_fiber_emissive.shader
index c65f259..b5e1a03 100644
--- a/Studio/Content/Material Library/carbon_fiber_emissive.shader
+++ b/Studio/Content/Material Library/carbon_fiber_emissive.shader
@@ -20,7 +20,6 @@
<Property formalName="Intensity" name="intensity" description="Emission intensity" type="Float" default="1.000000" category="Material"/>
<Property formalName="Emission Color" name="emission_color" description="Color of the emission" type="Color" default="0 0 0" category="Material"/>
<Property formalName="Emissive Map" name="emissive_texture" description="Emissive texture of the material" type="Texture" filter="linear" minfilter="linearMipmapLinear" clamp="repeat" usage="emissive" default="./maps/materials/emissive.png" category="Material"/>
- <Property formalName="Emissive Mask Map" name="emissive_mask_texture" description="Emissive mask texture for the material" type="Texture" filter="linear" minfilter="linearMipmapLinear" clamp="repeat" usage="emissive_mask" category="Material"/>
</MetaData>
<Shaders type="GLSL" version="330">
<Shader>
@@ -87,6 +86,7 @@ struct texture_return
// temporary declarations
+texture_coordinate_info tmp2;
texture_coordinate_info tmp3;
texture_coordinate_info tmp4;
anisotropy_return tmp5;
@@ -130,7 +130,7 @@ bool evalTwoSided()
vec3 computeFrontMaterialEmissive()
{
- return( vec3( 1.0, 1.0, 1.0) * vec3( vec3( ( intensity *( emission_color.rgb * fileTexture(emissive_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_alpha, transformCoordinate( rotationTranslationScale( vec3( 0.000000, 0.000000, 0.000000 ), vec3( 0.000000, 0.000000, 0.000000 ), vec3( 1.000000, 1.000000, 1.000000 ) ), tmp3 ), vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_default ).tint ) ) ) ) );
+ return intensity * emission_color.rgb * fileTexture(emissive_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_alpha, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_default ).tint;
}
void computeFrontLayerColor( in vec3 normal, in vec3 lightDir, in vec3 viewDir, in vec3 lightDiffuse, in vec3 lightSpecular, in float materialIOR, float aoFactor )
@@ -229,16 +229,18 @@ vec3 computeNormal()
void computeTemporaries()
{
- tmp3 = textureCoordinateInfo( texCoord0, tangent, binormal );
- tmp4 = 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 ) ), tmp3 );
- tmp5 = anisotropyConversion( base_roughness, anisotropy, fileTexture(anisotropy_rotation_texture, vec3( 0, 0, 0 ), vec3( 3.14, 3.14, 3.14 ), mono_luminance, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_linear ).mono, tangent, false );
- tmp7 = fileBumpTexture(bump_texture, bump_amount, mono_average, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, normal );
- ftmp0 = tmp5.roughness_u;
- ftmp1 = tmp5.roughness_v;
- ftmp2 = fileTexture(reflect_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_linear ).tint;
- ftmp3 = tmp5.tangent_u;
- ftmp4 = fileTexture(diffuse_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_srgb ).tint;
- tmpShadowTerm = evalBakedShadowMap( texCoord0 );
+ vec3 tiling = vec3( texture_tiling[0], texture_tiling[1], 1.000000 );
+ tmp2 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_emissive_texture(texCoord0), tangent, binormal ) );
+ tmp3 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_bump_texture(texCoord0), tangent, binormal ) );
+ tmp4 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_anisotropy_rotation_texture(texCoord0), tangent, binormal ) );
+ tmp5 = anisotropyConversion( base_roughness, anisotropy, fileTexture(anisotropy_rotation_texture, vec3( 0, 0, 0 ), vec3( 3.14, 3.14, 3.14 ), mono_luminance, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_linear ).mono, tangent, false );
+ tmp7 = fileBumpTexture(bump_texture, bump_amount, mono_average, tmp3, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, normal );
+ ftmp0 = tmp5.roughness_u;
+ ftmp1 = tmp5.roughness_v;
+ ftmp2 = fileTexture(reflect_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_linear ).tint;
+ ftmp3 = tmp5.tangent_u;
+ ftmp4 = fileTexture(diffuse_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp4, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, gamma_srgb ).tint;
+ tmpShadowTerm = evalBakedShadowMap( texCoord0 );
}
vec4 computeLayerWeights( in float alpha )