Difference between revisions of "Arcane University:NetImmerse Format/BSEffectShaderProperty"
(change first sentence) |
(→Shader flags: fill in shader flags. some of these are probably wrong...) |
||
| Line 22: | Line 22: | ||
== Shader flags == | == Shader flags == | ||
| + | Shader flags are divided into two fields: Shader Flags 1 and Shader Flags 2. | ||
=== Shader flags 1 === | === Shader flags 1 === | ||
| + | * '''Specular''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Skinned''': Enables skinning (rigged meshes). | ||
| + | * '''Temp refraction''': Refraction gives overall transparency, but the separate refraction setting is used. Deprecated?{{tn|Needs to be confirmed.}} | ||
| + | * '''Vertex alpha''': Enables vertex alpha for transparency. However, if the shape has an alpha property, the shape will have transparency in game ''even if this flag is not set''. | ||
| + | * '''Grayscale to palette color''': Enables grayscale texture influence on source texture color.{{tn|How are these colors mapped exactly?}} | ||
| + | * '''Grayscale to palette alpha''': Enables grayscale texture influence on source texture alpha.{{tn|How are these values mapped exactly?}} | ||
| + | * '''Use falloff''': Enables falloff effect. | ||
| + | * '''Environment mapping''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Receive shadows''': Used only by [[AU:lighting shader|lighting shader]]s (effect shaders can not receive shadows). | ||
| + | * '''Cast shadows''': Enables casting shadows. Does nothing in Special Edition, effectively always enabled (looks like it works in CK though!). | ||
| + | * '''Facegen detail map''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Parallax''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Model space normals''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Non projective shadows''': Prevents shadows from being cast from this object onto the environment.{{tn|Needs to be tested in game.}} | ||
| + | * '''Landscape''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Refraction''': Use normal map for refraction effect. | ||
| + | * '''Fire Refraction''': Enables animated scrolling refraction effect. | ||
| + | * '''Eye environment mapping''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Hair soft lighting''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Screendoor alpha fade''': Unknown. | ||
| + | * '''Localmap hide secret''': Hides this object and anything beneath it from the local map. | ||
| + | * '''Facegen RGB tint''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Own emit''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Projected UV''': Projects textures based on view rather than the shape's UV map. [https://ck.uesp.net/wiki/Talk:EffectShader#Projected_UVs Broken] in Skyrim and Special Edition. | ||
| + | * '''Multiple Textures''': Unknown. | ||
| + | * '''Remappable Textures''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Decal''': Helps prevent z-fighting by making this shape appear on top of nearby shapes if they get too close together in the z order. | ||
| + | * '''Dynamic decal''': Same as above? | ||
| + | * '''Parallax Occlusion''': Unknown. | ||
| + | * '''External Emittance''': Enables receiving external emittance data for this shape, with the corresponding [[AU:NetImmerse Format#BSXFlags|BSXFlag]]. | ||
| + | * '''Soft effect''': Unknown. | ||
| + | * '''ZBuffer test''': Enables depth testing. | ||
=== Shader flags 2 === | === Shader flags 2 === | ||
| + | * '''ZBuffer write''': Enables writing to the depth buffer. | ||
| + | * '''LOD landscape''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''LOD Objects''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''No Fade''': Disables fading of the object, even if its root is a BSFadeNode. | ||
| + | * '''Double Sided''': Enables double sided rendering. The backface will have reversed normals, so it's only good for minor details. If the player is really going to look at the back side, make it a true double sided mesh instead. | ||
| + | * '''Vertex Colors''': Enables vertex colors. They are blended multiplicatively, so if the mesh has no vertex colors, they will be interpreted as all zeroes and the mesh will appear black in game. | ||
| + | * '''Glow map''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Assume shadowmask''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Packed tangent''': Unknown. | ||
| + | * '''Multi index snow''': Unknown. | ||
| + | * '''Vertex lighting''': Enables vertex lighting using vertex colors as a source?{{tn|Needs to be tested.}} | ||
| + | * '''Uniform scale''': Unknown. | ||
| + | * '''Fit Slope''': Unknown. | ||
| + | * '''Billboard''': Billboard mesh? | ||
| + | * '''No LOD land blend''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''EnvMap light fade''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Wireframe''': Enables wireframe rendering?{{tn|Needs to be tested in game.}} | ||
| + | * '''Weapon blood''': Used for blood decals on weapons. | ||
| + | * '''Hide on local map''': Similar to Localmap hide secret, but only for self?{{tn|Needs to be tested in game.}} | ||
| + | * '''Premult alpha''': Enables premultiplied alpha. | ||
| + | * '''Cloud LOD''': Unknown. | ||
| + | * '''Anisotropic lighting''': Unknown. Used for hair? | ||
| + | * '''No transparency multisampling''': Unknown. | ||
| + | * '''Unused01''': Unused. | ||
| + | * '''Multi layer parallax''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Soft lighting''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Rim lighting''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Back lighting''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Unused02''': Unused. | ||
| + | * '''Tree anim''': Used only by [[AU:lighting shader|lighting shader]]s. | ||
| + | * '''Effect Lighting''': Enables influence by effect lighting from weathers and from point lights placed nearby. | ||
| + | * '''HD LOD Objects''': Unknown. | ||
== Tutorials == | == Tutorials == | ||
Revision as of 14:25, 1 December 2025
The BSEffectShaderProperty is a type of shader property used in Skyrim nifs for many special effects like magic effects, and ambient effects like waterfalls, steam, and mist. There is quite a variety of usable effects, from animated textures to animated meshes over particle effects and vertex lighting. Many things can be realized with these basic effect types, given the number of controllers to modify them. Note that like with lighting shaders, effect shaders are one level below the TriShape and there can only be one of its kind in a TriShape, so you might want to use several shapes in your nif (NiNode skinned rigs or BSFadeNode for statics) if you need several effects.
Fields
Unlike lighting shaders, there are no overall types for effect shaders. Therefore, all fields are always present.
- UV Offset: How much to offset the UV map.
- UV Scale: How much to scale the UV map.
- Source Texture: The base texture to use for rendering.
- Texture Clamp Mode: Whether to clamp or wrap the UVs for vertices which fall outside the 0.0-1.0 range. Tiling textures must use wrapping. Non-tiling may use either wrap or clamp, but may be slightly more performant using clamp.
- Lighting Influence: How much the color is affected by ambient light. Ranges from zero (no effect--uses own color only) to 255 (takes all color from ambient light). If this is too low, the shape will appear to glow when in darkness.
- Env Map Min LOD: Unknown.
- Base Color: Influences color of the source texture.testing needed
- Base Color Scale: Multiplier on Base color.
Falloff
Falloff is an effect where the opacity of the shape changes depending on the viewing angle. Useful for shapes where you want it to disappear when looked at from the side, like clouds or mist.
- Falloff Start Angle: The viewing angle at which opacity is equal to "Falloff Start Opacity."
- Falloff Stop Angle: The viewing angle at which opacity is equal to "Falloff Stop Opacity."
- Falloff Start Opacity: Opacity at the "Falloff Start Angle."
- Falloff Stop Opacity: Opacity at the "Falloff Stop Angle."
- Soft Falloff Depth: Unknown.
Shader flags
Shader flags are divided into two fields: Shader Flags 1 and Shader Flags 2.
Shader flags 1
- Specular: Used only by lighting shaders.
- Skinned: Enables skinning (rigged meshes).
- Temp refraction: Refraction gives overall transparency, but the separate refraction setting is used. Deprecated?testing needed
- Vertex alpha: Enables vertex alpha for transparency. However, if the shape has an alpha property, the shape will have transparency in game even if this flag is not set.
- Grayscale to palette color: Enables grayscale texture influence on source texture color.testing needed
- Grayscale to palette alpha: Enables grayscale texture influence on source texture alpha.testing needed
- Use falloff: Enables falloff effect.
- Environment mapping: Used only by lighting shaders.
- Receive shadows: Used only by lighting shaders (effect shaders can not receive shadows).
- Cast shadows: Enables casting shadows. Does nothing in Special Edition, effectively always enabled (looks like it works in CK though!).
- Facegen detail map: Used only by lighting shaders.
- Parallax: Used only by lighting shaders.
- Model space normals: Used only by lighting shaders.
- Non projective shadows: Prevents shadows from being cast from this object onto the environment.testing needed
- Landscape: Used only by lighting shaders.
- Refraction: Use normal map for refraction effect.
- Fire Refraction: Enables animated scrolling refraction effect.
- Eye environment mapping: Used only by lighting shaders.
- Hair soft lighting: Used only by lighting shaders.
- Screendoor alpha fade: Unknown.
- Localmap hide secret: Hides this object and anything beneath it from the local map.
- Facegen RGB tint: Used only by lighting shaders.
- Own emit: Used only by lighting shaders.
- Projected UV: Projects textures based on view rather than the shape's UV map. Broken in Skyrim and Special Edition.
- Multiple Textures: Unknown.
- Remappable Textures: Used only by lighting shaders.
- Decal: Helps prevent z-fighting by making this shape appear on top of nearby shapes if they get too close together in the z order.
- Dynamic decal: Same as above?
- Parallax Occlusion: Unknown.
- External Emittance: Enables receiving external emittance data for this shape, with the corresponding BSXFlag.
- Soft effect: Unknown.
- ZBuffer test: Enables depth testing.
Shader flags 2
- ZBuffer write: Enables writing to the depth buffer.
- LOD landscape: Used only by lighting shaders.
- LOD Objects: Used only by lighting shaders.
- No Fade: Disables fading of the object, even if its root is a BSFadeNode.
- Double Sided: Enables double sided rendering. The backface will have reversed normals, so it's only good for minor details. If the player is really going to look at the back side, make it a true double sided mesh instead.
- Vertex Colors: Enables vertex colors. They are blended multiplicatively, so if the mesh has no vertex colors, they will be interpreted as all zeroes and the mesh will appear black in game.
- Glow map: Used only by lighting shaders.
- Assume shadowmask: Used only by lighting shaders.
- Packed tangent: Unknown.
- Multi index snow: Unknown.
- Vertex lighting: Enables vertex lighting using vertex colors as a source?testing needed
- Uniform scale: Unknown.
- Fit Slope: Unknown.
- Billboard: Billboard mesh?
- No LOD land blend: Used only by lighting shaders.
- EnvMap light fade: Used only by lighting shaders.
- Wireframe: Enables wireframe rendering?testing needed
- Weapon blood: Used for blood decals on weapons.
- Hide on local map: Similar to Localmap hide secret, but only for self?testing needed
- Premult alpha: Enables premultiplied alpha.
- Cloud LOD: Unknown.
- Anisotropic lighting: Unknown. Used for hair?
- No transparency multisampling: Unknown.
- Unused01: Unused.
- Multi layer parallax: Used only by lighting shaders.
- Soft lighting: Used only by lighting shaders.
- Rim lighting: Used only by lighting shaders.
- Back lighting: Used only by lighting shaders.
- Unused02: Unused.
- Tree anim: Used only by lighting shaders.
- Effect Lighting: Enables influence by effect lighting from weathers and from point lights placed nearby.
- HD LOD Objects: Unknown.