summaryrefslogtreecommitdiffstats
path: root/Studio/Content/Material Library/plastic_structured_red_emissive.shader
diff options
context:
space:
mode:
Diffstat (limited to 'Studio/Content/Material Library/plastic_structured_red_emissive.shader')
-rw-r--r--Studio/Content/Material Library/plastic_structured_red_emissive.shader15
1 files changed, 10 insertions, 5 deletions
diff --git a/Studio/Content/Material Library/plastic_structured_red_emissive.shader b/Studio/Content/Material Library/plastic_structured_red_emissive.shader
index f85719e..ed2d7bb 100644
--- a/Studio/Content/Material Library/plastic_structured_red_emissive.shader
+++ b/Studio/Content/Material Library/plastic_structured_red_emissive.shader
@@ -78,6 +78,8 @@ struct texture_return
// temporary declarations
+texture_coordinate_info tmp1;
+texture_coordinate_info tmp2;
vec4 tmpShadowTerm;
layer_result layers[1];
@@ -114,13 +116,14 @@ 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 ) ), textureCoordinateInfo( texCoord0, tangent, binormal ) ), 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), vec3(1.0), 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), vec3(1.0), 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 * diffuseReflectionBSDF( normal, lightDir, viewDir, lightDiffuse, 0.000000 );
+ layers[0].base += tmpShadowTerm * diffuseReflectionBSDF( normal, lightDir, lightDiffuse );
layers[0].layer += tmpShadowTerm * microfacetBSDF( layers[0].tanFrame, lightDir, viewDir, lightSpecular, materialIOR, roughness, roughness, scatter_reflect );
#endif
@@ -143,7 +146,7 @@ void computeFrontLayerEnvironment( in vec3 normal, in vec3 viewDir, float aoFact
#else
layers[0].base += tmpShadowTerm * sampleDiffuse( layers[0].tanFrame ) * aoFactor;
- layers[0].layer += tmpShadowTerm * sampleGlossyAniso( layers[0].tanFrame, viewDir, roughness, roughness );
+ layers[0].layer += tmpShadowTerm * sampleGlossy( layers[0].tanFrame, viewDir, roughness );
#endif
}
@@ -192,12 +195,14 @@ float evalCutout()
vec3 computeNormal()
{
- return( perlinNoiseBumpTexture( transformCoordinate( rotationTranslationScale( vec3( 0.000000, 0.000000, 0.000000 ), vec3( 0.000000, 0.000000, 0.000000 ), vec3( ( texture_scaling*10.000000 ) ) ), coordinateSource(texture_coordinate_object, 0 ) ), bump_factor, 1.000000, false, false, 0.000000, 6, true, vec3( 0.000000, 0.000000, 0.000000 ), 0.070000, 0.300000, 1.000000, normal ) );
+ return( perlinNoiseBumpTexture( scaleCoordinate( vec3(texture_scaling*10.000000), coordinateSource(texture_coordinate_object, 0 ) ), bump_factor, 1.000000, false, false, 0.000000, 6, true, vec3( 0.000000, 0.000000, 0.000000 ), 0.070000, 0.300000, 1.000000, normal ) );
}
void computeTemporaries()
{
- tmpShadowTerm = evalBakedShadowMap( texCoord0 );
+ tmp1 = textureCoordinateInfo( texcoordTransformed_emissive_texture(texCoord0), tangent, binormal );
+ tmp2 = textureCoordinateInfo( texcoordTransformed_emissive_mask_texture(texCoord0), tangent, binormal );
+ tmpShadowTerm = evalBakedShadowMap( texCoord0 );
}
vec4 computeLayerWeights( in float alpha )