diff options
Diffstat (limited to 'Studio/Content/Material Library/bamboo_natural_matte_emissive.shader')
-rw-r--r-- | Studio/Content/Material Library/bamboo_natural_matte_emissive.shader | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Studio/Content/Material Library/bamboo_natural_matte_emissive.shader b/Studio/Content/Material Library/bamboo_natural_matte_emissive.shader index 7096c14..2ffae65 100644 --- a/Studio/Content/Material Library/bamboo_natural_matte_emissive.shader +++ b/Studio/Content/Material Library/bamboo_natural_matte_emissive.shader @@ -75,6 +75,8 @@ struct texture_return // temporary declarations texture_coordinate_info tmp2; texture_coordinate_info tmp3; +texture_coordinate_info tmp4; +texture_coordinate_info tmp5; vec3 tmp6; vec3 ftmp0; vec3 ftmp1; @@ -111,7 +113,7 @@ bool evalTwoSided() vec3 computeFrontMaterialEmissive() { - return( vec3(1.0) * vec3( vec3( ( intensity *( emission_color.rgb * fileTexture(emissive_texture, vec3(0.0), vec3(1.0), mono_alpha, transformCoordinate( rotationTranslationScale( vec3(0.0), vec3(0.0), vec3(1.0) ), tmp2 ), 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), 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) @@ -120,7 +122,7 @@ void computeFrontLayerColor(in vec3 normal, in vec3 lightDir, in vec3 viewDir, i 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 } @@ -145,7 +147,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; @@ -202,12 +204,15 @@ vec3 computeNormal() void computeTemporaries() { - tmp2 = textureCoordinateInfo( texCoord0, tangent, binormal ); - tmp3 = 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 ) ), tmp2 ); - tmp6 = fileBumpTexture(bump_texture, bump_amount, mono_average, tmp3, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, normal ); - ftmp0 = fileTexture(reflect_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_linear ).tint; - ftmp1 = 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; - tmpShadowTerm = evalBakedShadowMap( texCoord0 ); + vec3 tiling = vec3( texture_tiling[0], texture_tiling[1], 1.0); + 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_reflect_texture(texCoord0), tangent, binormal ) ); + tmp4 = scaleCoordinate(tiling, textureCoordinateInfo( texcoordTransformed_diffuse_texture(texCoord0), tangent, binormal ) ); + tmp6 = fileBumpTexture(bump_texture, bump_amount, mono_average, tmp3, vec2( 0.000000, 1.000000 ), vec2( 0.000000, 1.000000 ), wrap_repeat, wrap_repeat, normal ); + ftmp0 = 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; + ftmp1 = fileTexture(diffuse_texture, vec3( 0, 0, 0 ), vec3( 1, 1, 1 ), mono_luminance, tmp5, 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 ) |