Changes

Jump to navigation Jump to search

Documentation/Tools/SCS Blender Tools/Supported shaders

590 bytes added, 21:02, 27 August 2016
m
Made page a bit more cleaner by not showing the hashtags. The links still work, just look better.
=== building.add.env.day ===
Use this material if you want your building windows to reflect at day-time and be lit at night. It shall be more or less used on distant "panorama" buildings as they don't need advanced features from [[#window.day|window.day]] / [[#window.night|window.night]].
It effectively switches two materials depending on the time of the day. During the day it uses [[#dif.spec.add.env|dif.spec.add.env]] material with texture for reflections and at night switches to [[#dif.lum.spec|dif.lum.spec]] in order for windows to light at the night.
The texture must have alpha channel on places where it should have reflections and light at night.
=== building.day ===
Same as [[#building.add.env.day|building.add.env.day]] without reflection component.
It effectively switches two materials depending on the time of the day. During the day it uses [[#dif.spec|dif.spec]] material where alpha is used as specular map and at night switches to [[#dif.lum.spec|dif.lum.spec]] in order for windows to light at the night.
=== building.lvcol.day ===
Same as [[#building.day|building.day]] with extra multiplication of vertex color.
During the day vertex color is multiplying specular map, on the other hand during the night vertex color is multiplying luminance.
=== dif.anim ===
Same as [[#dif|dif]] with extra behaviour of blending over time between base and over texture.
Extra auxiliary setting in this shader defines animation speed, meaning how quickly textures are switched.
=== dif.lum ===
Same as [[#dif|dif]] with additional linear interpolation calculation between "dif" shader result and base texture RGB colors by factor of base texture alpha channel. As a result this shader will give you lit surfaces during the night, where amount of surface lit is donated by base texture alpha channel.
Example usage of this shader are dashboard and gps surfaces in truck inside Euro Truck Simulator 2 game.
=== dif.lum.spec ===
Similar as [[#dif.lum|dif.lum]] with difference that surface has additional specular map shading as [[#dif.spec|dif.spec]].
=== dif.spec ===
=== dif.spec.add.env ===
Same as [[#dif.spec|dif.spec]] with additional reflection pass and texture.
==== Useful flavor combinations ====
=== dif.spec.add.env.nofresnel ===
Same as [[#dif.spec.add.env|dif.spec.add.env]] without fresnel attribute and computation, therefore is slightly cheaper to compute.
=== dif.spec.fade.dif.spec ===
=== dif.spec.mult.dif.spec ===
Same as [[#dif.spec|dif.spec]] with one more texture which color and alpha is multiplied with base texture.
Example usage in Euro Truck Simulator 2 is trailer where company texture is multiplied with base texture of the trailer.
=== dif.spec.mult.dif.spec.add.env ===
Same as [[#dif.spec.mult.dif.spec|dif.spec.mult.dif.spec]] with additional reflection pass and texture.
=== dif.spec.mult.dif.spec.iamod.dif.spec ===
Special use shader based on [[#dif.spec.mult.dif.spec|dif.spec.mult.dif.spec]] and is usually used for building walls.
Shader is combining two multiplied opaque textures with third inverse-vertex-alpha (iamod) texture. The third texture should represent decal/dirt/wear layer where texture alpha channel and vertex alpha controls how strong this decal application is. Vertex color alpha with value 0 will apply the most and value 0.5 won't apply third layer at all.
=== dif.spec.oclu ===
Behaves in similar way as [[#dif.spec.mult.dif.spec|dif.spec.mult.dif.spec]] but the second texture in this case is using gray-scale image (only one channel) which results in better performance.
General usage of this shader is as recognized as using [[#dif.spec|dif.spec]] with "ambient occlusion" texture.
=== dif.spec.oclu.add.env ===
Same as [[#dif.spec.oclu|dif.spec.oclu]] with additional reflection pass and texture.
=== dif.spec.over.dif.opac ===
Same as [[#dif.spec|dif.spec]] with extra mask texture which color is mixed with base texture color by factor of alpha from mask texture.
=== dif.spec.weight ===
Same as [[#dif.spec|dif.spec]] with modified specular light.
It's mostly used for roads and asphalts, due distinct feel of specularity and diffuse properties of such surfaces.
=== dif.spec.weight.add.env ===
Same shader as [[#dif.spec.weight|dif.spec.weight]] with additional reflection pass and texture.
=== dif.spec.weight.mult2 ===
Special case shader created mostly for road surfaces combining base texture with "smeared top layer". Smeared layer is donated by multiplication texture and mixed by both textures alpha channels.
This shader shall be replaced with simple [[#dif.spec.weight|dif.spec.weight]] instead if possible.
=== dif.spec.weight.mult2.weight2 ===
Transition shader between two shaders of [[#dif.spec.weight.mult2|dif.spec.weight.mult2]] for simulating transitional areas (usually road shoulders).
Fading between first and second shader is done by vertex color alpha, where value 0 will use only first layer and value 0.5 will use only second layer, any value in-between will mix both layers respectively.
This shader shall be replaced with [[#dif.spec.weight.weight.dif.spec.weight|dif.spec.weight.weight.dif.spec.weight]] instead if possible.
=== dif.spec.weight.weight.dif.spec.weight ===
Transition shader between two shaders of [[#dif.spec.weight|dif.spec.weight]], where texture for first shader is presented as base and texture for second shader as over texture.
Fading between the two is done by vertex color alpha, where value 0 will use only base texture layer and value 0.5 will use only over texture layer, any value in-between will mix both layers respectively.
=== dif.weight.dif ===
Transition shader between two shaders of [[#dif|dif]] where base texture presents texture for first shader and over texture presents texture for second shader.
Fading between the two is done by vertex color alpha, where value 0 will use only base texture layer and value 0.5 will use only over texture layer, any value in-between will mix both layers respectively.
Shader used in special cases for static not moving grass.
It's result is the same as [[#dif|dif]] with transparency controlled by multiplication between vertex alpha color and base texture alpha channel.
Normals on the meshes using this shader are ignored as shader always uses normals up as lighting applied to mesh should more-or-less match the ground (assuming ground is flat).
=== lightmap.night ===
It is night variant of [[#light.tex|light.tex]], meaning surface with this shader will be visible only during the night. During the day this light map will be switched off.
=== mlaaweight ===
=== sign ===
Special case shader used for sign surfaces. Similarly as [[#reflective|reflective]] this shader simulates interaction with player's headlights.
=== sky ===
=== unlit.vcol.tex ===
Similar to [[#unlit.tex|unlit.tex]] with additional multiplication by vertex color.
As for transparent flavor combinations this shader uses vertex color alpha multiplied with base texture alpha channel.
=== altuv ===
Special flavor used only on [[#truckpaint|truckpaint]] shader type. It tells shader to use second UV mapping for paintjob texture.
=== airbrush ===
Special flavor used only for [[#truckpaint|truckpaint]] shader type. It tells shader that paintjob texture should be applied as airbrush paintjob.
For more information on airbrush paintjob behaviour see: [[#Paintjob modes|Paintjob modes]]
=== awhite ===
Special flavor used only for [[#unlit.vcol.tex|unlit.vcol.tex]], moreover should be used only in combination with multiplication blending mode (See [[#add & over & mult]]).
This particular combination will blend out to white color where base texture alpha channel is 0.
=== colormask ===
Special flavor used only for [[#truckpaint|truckpaint]] shader type. It tells shader that paintjob texture should be applied as colormask paintjob.
For more information on color mask paintjob behaviour see: [[#Paintjob modes|Paintjob modes]]
=== decal ===
=== indenv ===
Special flavor used on [[#dif.spec.add.env|dif.spec.add.env]] marking independent environment reflection from material specular color.
This gives user ability to use reflections also on surfaces where specular light is not reaching the surfaces. Example usage for this in [[Games|Euro Truck Simulator 2]] would be any part of reflective interior where sun never shines.
=== linv ===
Flavor inverting luminance mixing used on luminance shaders of [[#dif.lum.spec|dif.lum.spec]].
Luminance shaders usually illuminate surfaces where base texture alpha channel is 255 and don't on surfaces with alpha value 0. This flavor inverts that behavior so that an alpha value of 0 gives full illumination and an alpha value of 255 gives no illumination.
=== lvcol ===
Flavor enabling luminance multiplication with vertex color used on luminance shaders: [[#dif.lum|dif.lum]] or [[#dif.lum.spec|dif.lum.spec]].
=== tsnmap & tsnmap16 & tsnmapuv & tsnmapuv16 ===
=== nocull ===
Special flavor switching off backface culling of shadow casters on shaders: [[#shadowonly|shadowonly]] or [[#fakeshadow|fakeshadow]].
Basically this means shadow casters will cast shadows on both sides, not only on the one where surface normals are directed.
Flavor enabling shadow casting pass on shader.
As there is separate shadow caster shader named [[#shadowonly|shadowonly]], this flavor should be used exceptionally. Usually can be used on animated models where cost of animation calculation on extra shadow caster mesh may be greater then calculating shadow caster directly from "high" poly mesh.
=== tg0 ===
86
edits

Navigation menu