#author("2024-03-08T16:56:37+09:00","default:admin","admin")
#author("2024-06-27T14:29:41+09:00","default:admin","admin")
*Specifications: Shaders [#pe6cab70]
This section describes each shader.
Shaders should be changed according to what you want to achieve, so refer to this explanation and sample data to specify the shader you are looking for.

-''Recommended Shaders''
General Background Models: a_n_rm
Simple Textured Background Models: map
Addition: map_nolit_add
Translucent: map_nolit_alpha
Glass: glass
Water: transparent_normal_water
Leaves Swaying in the Wind: map_wind_discard
#contents
**''Shader Descriptions'' [#xc2a296c]
***''2dmap_skybox'' [#vdfeed13]
Specify a background material with a 2D texture.
The material with this shader selected will be available for selection in "Map Settings > Rendering > Background Material".

#ref(2dmap_skybox.png)
#br

***''a_n'' [#l3311421]
This shader uses physics-based shading with an albedo map and a normal map available for setting.

#ref(a_n.png)
#br

***''a_n_discard'' [#b6a99a80]
This shader uses physics-based shading with an albedo map and a normal map available for setting.
It is also possible to use the alpha channel of an albedo map to discard alpha.

#ref(a_n_discard.png)
#br

***''a_n_rm'' [#c9c5fe9b]
This shader uses physics-based shading with an albedo map, a normal map and a mask map available for setting.
This is the recommended shader when using physics-based shading in Bakin.

#ref(a_n_rm.png)
#br

***''a_n_rm_discard'' [#r9747d8d]
This shader uses physics-based shading with an albedo map, a normal map and a mask map available for setting.
It is also possible to use the alpha channel of an albedo map to discard alpha.

#ref(a_n_rm_discard.png)
#br


***''a_n_rm_sss_discard'' [#v396c48a]
This shader uses physics-based shading with an albedo map, a normal map and a mask map available for setting.
It is also possible to use the alpha channel of an albedo map to discard alpha.
In addition, the use of SSS (Subsurface Scattering) mask map allows for the rendering of light transparency.

#ref(a_n_rm_sss_discard.png)
#br

***''a_n_rm_wind_discard'' [#k2cc7114]
This shader uses physics-based shading with an albedo map, a normal map and a mask map available for setting.
It is also possible to use the alpha channel of an albedo map to discard alpha.
In addition, you can specify swaying effects in the wind.
When using with grass growing on the ground, turn on "Fix Y=0".
See [[Creation Tips:https://rpgbakin.com/pukiwiki_en/?Creation+Tips#vec24090]] for more information.

#ref(a_n_rm_wind_discard.png)
#br

***''a_n_wind_discard'' [#x700cef6]
This shader uses physics-based shading with an albedo map and a normal map available for setting.
It is also possible to use the alpha channel of an albedo map to discard alpha.
In addition, you can specify swaying effects in the wind.
When using with grass growing on the ground, turn on "Fix Y=0".
See [[Creation Tips:https://rpgbakin.com/pukiwiki_en/?Creation+Tips#vec24090]] for more information.

#ref(a_n_wind_discard.png)
#br

***''character_create_hair'' [#e1209e09]
This is a special shader, a hair shader for characters, used in the Bakin sample character models.
Overlay composite of vertex color and parameter hair color.


#ref(character_create_hair.png)
#br

***''character_create_skin'' [#i2a5fc25]
This is a special shader, a skin shader for characters, used in the Bakin sample character models.
Parts such as eyes and mouth are placed from the vertex coordinates based on the parameters.

#ref(character_create_skin.png)
#br

***''cubemap_skybox'' [#kd79e58d]
Specify a background material with a texture in .hdr format.
The material with this shader selected will be available for selection in "Map Settings > Rendering > Background Material".

#ref(cubemap_skybox.png)
#br

***''decal'' [#g7565409]
Special shader allows 2D images to be projected onto terrain and 3D models.
#ref(Shader_decal.png)
#br
-'' Rendering Type ''
Opaque (no alpha removal), Cutoff (cut off the alpha portion), and AlphaBlend can be selected.

-''Use Screen Normals''
When turned on, the normal of the projected object will be affected. The right side of the image below shows the state in which it is turned on.
#ref(./Use_Screen_Normal.png,80%)
#br

-''Allowable Angle''
You can set a number between -1 and 1. Basically, 0 is acceptable.
|1|Only surfaces with exactly the same orientation will be displayed. In some cases, there will be areas that cannot be projected.|
|0|If it is not facing the back, it will be displayed.|
|-1|It is unconditionally written on all surfaces. Textures can be projected even when stretched.|

***''glass'' [#f0f853ef]
It renders a glass-like effect.

#ref(glass.png)
#br

***''map'' [#c372e5da]
It is a physics-based extension of a shader from a non-physical based rendering.
Color textures can be specified.

#ref(map.png)
#br

***''map_discard'' [#q99441c8]
Based on the map shader, discarding the alpha (non-transparent).
It can be used for leaves and etc.

#ref(map_discard.png)
#br

***''map_nolit'' [#wa1bef39]
This is a shader that does not perform lighting and does not apply an environment map, but displays the color of the texture as it is.
Rendered as opaque.

#ref(map_nolit.png)
#br

***''map_nolit_add'' [#b7e79d02]
No lighting or environment map is applied, and the texture is blended with the color of the texture as it is by addition.
Rendered as translucent.

#ref(map_nolit_add.png)
#br

***''map_nolit_alpha'' [#pd65e6b4]
No lighting or environment map is applied, and the texture is composited with the texture's alpha value, using the texture's color as it is.
Rendered as translucent.

#ref(map_nolit_alpha.png)
#br

***''map_nolit_discard'' [#k5885a0e]
Based on the map_nolit shader, discarding the alpha (non-transparent).
Rendered as opaque.

#ref(map_nolit_discard.png)
#br

***''map_nolit_modulate'' [#q258fd07]
No lighting or environment map is applied, and the texture is blended by modulate, using the color of the texture as it is.
Rendered as translucent.

//COLOR(#FF0000):画像入る

#ref(map_nolit_modulate.png)
#br

***''map_notex'' [#g0d0716e]
Displays polygons using only vertex colors, without textures.
Performs physics-based shading.
Rendered as opaque.
//COLOR(#FF0000):画像入る

#ref(map_notex.png)
#br

***''map_terrain'' [#n58294db]
It is rendered in the same way as the terrain.
When a model exported using the Map Editor's "Model Export" context menu is placed on the map as a stamp, it can be used to match the appearance of the terrain.
#ref(map_terrain_EN.png)
#br

***''map_wind_discard'' [#sffa9b81]
This shader adds vertex animation by wind to map_discard.
When using with grass growing on the ground, turn on "Fix Y=0".

See [[Creation Tips:https://rpgbakin.com/pukiwiki_en/?Creation+Tips#vec24090]] for more information.
//COLOR(#FF0000):画像入る

#ref(map_wind_discard.png)
#br

***''toon'' [#h17fd4d0]
The rendering is performed in a cartoon style with clear shadows.
//#ref(toon.png)
//#br

-''Rendering Type''
Specify whether the material is opaque or translucent.
-- ''Opaque'': Opaque. Suitable for solid objects with no transparent areas.
-- ''Cutoff'': Opaque. Opaque and transparent areas are clearly separated.
-- ''Tranclucent'': Translucent. Suitable for objects that are also transparent in the real world. Does not write depth.
-- ''Tranclucent With Depth'': Translucent. Only the foreground is rendered when translucent objects overlap each other. Writes depth.
-''Lit Map''
Assign a colormap that will be the primary color of the model.
-''Lit Color''
The specified color is multiplied by the Lit Map. This is the main color of the lighted area.
-''Shade Map''
Assign a map for 1 shadow, which will be the shadow color area of the model.
-''Shade Color''
The color specified for the Shade map will be multiplied. The color of the shadow will be the color of the shadow that is not illuminated by light.
-''Normal Map''
Assign a normal map that defines the roughness.
-''Normal Scale''
Varies the degree to which the normal map is applied.
-''Toony''
Assign the degree of the cartoon style with crisp shadows and smooth shadows.
-''Shading Shift''
Assign the area spread of the shadowed area.
-''Lighting Mask Texture''
This texture is used to mask the result of lighting and assign dark areas.
-''Lighting Mask Scale''
Assign the degree to which the lighting mask texture is applied.
-''Light Saturation Scale''
Assign whether the light is to be used for lightness only or color as well.
-''Emission Map''
You can specify a constant color that is not affected by lighting. Bloom can be specified in the Rendering Settings to make it glow.
-''Emission''
The specified color is multiplied against the emission map.
-''Emission Intensity''
Assign the degree to which emissions are applied.
-''Matcap''
Assign a pre-lit sphere image. It is not affected by lighting. It can be used to simulate the luster of metals and other materials.
-''Matcap Scale''
Assign the degree to which the matcap is applied.
-''Rim Light Map''
Assign a texture that specifies the area to which the rim light will be applied, making the outline of the model appear to glow. The light shines from behind to emphasize the edges of the model.
-''Rim Light Color''
Assign the color of the rim light.
-''Rim Light Intensity''
Assign the intensity of the rim light.
-''Rim Light Lighting Mix''
Assign the percentage of the rim light color to be mixed with the normal lighting color.
-''Fresnel Power''
Assign the sharpness of the rim light.
-''Rim Light Lift''
Assign the spreading degree of the rim light.
-''Cut Off Threshold''
Assign the maximum value of alpha for the Lit Map to be clipped when the Rendering Type is Cutoff.
-''Outline Type''
Select the outline rendering type.
-- World: Render an outline of a fixed width for the World.
-- Screen: Render an outline of a fixed width for the Screen.
-''Outline Width Map''
The width of the outline can be adjusted by the lightness or darkness of the texture.
-''Maximum Outline Scale''
Specify to what extent outlines in the far distance of the World type outline may be thickened.
-''Outline Lighting''
Assign the percentage of the body's lighting results to be combined with the outline color.
-''UV Animation Mask''
This texture can be used to control whether the UV animation is affected or not.
-''UV Rotate Animation''
Assign the speed of the UV rotation animation.


***''transparent_normal_water'' [#r640531f]
Use a normal map to render the water surface.
The result of the back drawing is used for the refraction effect.

#ref(transparent_normal_water.png)
#br

-''Transparency Distance'': This is the degree of underwater murkiness. The opacity of the water gradually increases from the surface to the transparency distance.

#ref(透明度距離.png)
#br

-''Blend Distance'': This is the distance where the transparency changes from 0 to 1 in the composition of the junction with the shore. 0 makes the touching of the ground clear.

#ref(不透明度距離.png)
#br

-''Opaque Distance'': The distance until the "Transparency Distance" and "Blend Distance" become invalid with regard to the camera position.  The higher this value, the more the effects of "Transparency Distance" and "Blend Distance" do not disappear even when the camera is moved away.

#ref(合成距離.png)
#br

-''Water Fall Speed'': When this shader is applied to a mesh extending in the Y direction, water will flow from top to bottom like a waterfall, and to specify the speed at which the water surface falls. 

-''Water Flow Direction'': Specify the direction of water flow in 360 degrees.

Front page   Edit Diff History Attach Copy Rename Reload   New Page list Search Recent changes   Help   RSS of recent changes