summaryrefslogtreecommitdiffstats
path: root/Studio/Content/Material Library/aluminum_emissive.shader
diff options
context:
space:
mode:
Diffstat (limited to 'Studio/Content/Material Library/aluminum_emissive.shader')
-rw-r--r--Studio/Content/Material Library/aluminum_emissive.shader25
1 files changed, 15 insertions, 10 deletions
diff --git a/Studio/Content/Material Library/aluminum_emissive.shader b/Studio/Content/Material Library/aluminum_emissive.shader
index fa5d505..15645cb 100644
--- a/Studio/Content/Material Library/aluminum_emissive.shader
+++ b/Studio/Content/Material Library/aluminum_emissive.shader
@@ -79,7 +79,9 @@ struct texture_return
// temporary declarations
texture_coordinate_info tmp1;
texture_coordinate_info tmp2;
-float tmp3;
+texture_coordinate_info tmp3;
+texture_coordinate_info tmp4;
+float tmp5;
float ftmp0;
vec4 tmpShadowTerm;
@@ -112,14 +114,15 @@ 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.0, 0.0, 0.0 ), vec3( 0.0, 0.0, 0.0 ), vec3( 1.0, 1.0, 1.0 ) ), tmp1 ), vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), wrap_repeat, wrap_repeat, gamma_default ).tint*fileTexture(emissive_mask_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_alpha, transformCoordinate( rotationTranslationScale( vec3( 0.0, 0.0, 0.0 ), emissive_mask_offset, vec3( 1.0, 1.0, 1.0 ) ), tmp1 ), vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), 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, tmp1, vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), wrap_repeat, wrap_repeat, gamma_default ).tint
+ * fileTexture(emissive_mask_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_alpha, tmp2, vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), 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 )
{
#if QT3DS_ENABLE_CG_LIGHTING
layers[0].base += tmpShadowTerm * vec4( 0.0, 0.0, 0.0, 1.0 );
- layers[0].layer += tmpShadowTerm * microfacetBSDF( layers[0].tanFrame, lightDir, viewDir, lightSpecular, materialIOR, tmp3, tmp3, scatter_reflect );
+ layers[0].layer += tmpShadowTerm * microfacetBSDF( layers[0].tanFrame, lightDir, viewDir, lightSpecular, materialIOR, tmp5, tmp5, scatter_reflect );
#endif
}
@@ -128,7 +131,7 @@ void computeFrontAreaColor( in int lightIdx, in vec4 lightDiffuse, in vec4 light
{
#if QT3DS_ENABLE_CG_LIGHTING
layers[0].base += tmpShadowTerm * vec4( 0.0, 0.0, 0.0, 1.0 );
- layers[0].layer += tmpShadowTerm * lightSpecular * sampleAreaGlossy( layers[0].tanFrame, varWorldPos, lightIdx, viewDir, tmp3, tmp3 );
+ layers[0].layer += tmpShadowTerm * lightSpecular * sampleAreaGlossy( layers[0].tanFrame, varWorldPos, lightIdx, viewDir, tmp5, tmp5 );
#endif
}
@@ -137,11 +140,11 @@ void computeFrontLayerEnvironment( in vec3 normal, in vec3 viewDir, float aoFact
{
#if !QT3DS_ENABLE_LIGHT_PROBE
layers[0].base += tmpShadowTerm * vec4( 0.0, 0.0, 0.0, 1.0 );
- layers[0].layer += tmpShadowTerm * microfacetSampledBSDF( layers[0].tanFrame, viewDir, tmp3, tmp3, scatter_reflect );
+ layers[0].layer += tmpShadowTerm * microfacetSampledBSDF( layers[0].tanFrame, viewDir, tmp5, tmp5, scatter_reflect );
#else
layers[0].base += tmpShadowTerm * vec4( 0.0, 0.0, 0.0, 1.0 );
- layers[0].layer += tmpShadowTerm * sampleGlossy( layers[0].tanFrame, viewDir, tmp3 );
+ layers[0].layer += tmpShadowTerm * sampleGlossy( layers[0].tanFrame, viewDir, tmp5 );
#endif
}
@@ -195,10 +198,12 @@ vec3 computeNormal()
void computeTemporaries()
{
- tmp1 = textureCoordinateInfo( texCoord0, tangent, binormal );
- tmp2 = transformCoordinate( rotationTranslationScale( vec3( 0.0, 0.0, 0.0 ), vec3( 0.0, 0.0, 0.0 ), tiling ), tmp1 );
- tmp3 = fileTexture(roughness_texture, vec3( roughness_map_offset ), vec3( roughness_map_scale ), mono_luminance, tmp2, vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), wrap_repeat, wrap_repeat, gamma_default ).mono;
- ftmp0 = fileTexture(reflection_texture, vec3( reflection_map_offset ), vec3( reflection_map_scale ), mono_luminance, tmp2, vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), wrap_repeat, wrap_repeat, gamma_default ).mono;
+ tmp1 = textureCoordinateInfo( texcoordTransformed_emissive_texture(texCoord0), tangent, binormal );
+ tmp2 = textureCoordinateInfo( texcoordTransformed_emissive_mask_texture(texCoord0), tangent, binormal );
+ tmp3 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_roughness_texture(texCoord0), tangent, binormal ) );
+ tmp4 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_reflection_texture(texCoord0), tangent, binormal ) );
+ tmp5 = fileTexture(roughness_texture, vec3( roughness_map_offset ), vec3( roughness_map_scale ), mono_luminance, tmp3, vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), wrap_repeat, wrap_repeat, gamma_default ).mono;
+ ftmp0 = fileTexture(reflection_texture, vec3( reflection_map_offset ), vec3( reflection_map_scale ), mono_luminance, tmp4, vec2( 0.0, 1.0 ), vec2( 0.0, 1.0 ), wrap_repeat, wrap_repeat, gamma_default ).mono;
tmpShadowTerm = evalBakedShadowMap( texCoord0 );
}