-
Notifications
You must be signed in to change notification settings - Fork 6
Doc_Halo1_ShaderExtension
The specular map allows you to change the colour of the models specular reflection at the pixel level.
Field | Type | Usage |
---|---|---|
specular color map | tag reference | The specular colour map. |
specular color coefficient | real | The specular map colour is multiplied by this value. 0 defaults to 1. |
specular color exponent | real | The specular map colour is raise to this power. 0 defaults to 1. |
flags | word flags | Sets whether to use the alpha channel as an exponent mask. |
Normal maps allow you to add per pixel details to a model. They are typically created by baking the surface normals of a high resolution model into a bitmap using the texture coordinates of a low poly model. Normal maps must be in tangent space.
Detail normal maps can be used to add further close up details. The alpha channel of the base normal map controls how the detail normal maps are blended.
Alpha range | Usage |
---|---|
0/0.000 ===> 85/0.333 | No detail normals to detail normal 1. |
85/ 0.333 ===> 170/0.666 | Detail normal 1 to detail normal 2. |
255/1.000 ===> 255/1.000 | Detail normal 2 to no detail normals. |
Field | Type | Usage |
---|---|---|
base normal map | tag reference | The base normal map. |
base normal coefficient | real | The strength of the base normal map. |
detail normal 1 map | tag reference | The first detail normal map. |
detail normal 1 coefficient | real | The strength of the normal map. 0 defaults to 1. |
detail normal 1 scale | real | The texture coordinate scaling of the normal map. 0 defaults to 1. |
detail normal 1 v-scale | real | The additional V-texture coordinate scaling of the normal map. 0 defaults to 1. |
detail normal 2 map | tag reference | The second detail normal map. |
detail normal 2 coefficient | real | The strength of the normal map. 0 defaults to 1. |
detail normal 2 scale | real | The texture coordinate scaling of the normal map. 0 defaults to 1. |
detail normal 2 v-scale | real | The additional V-texture coordinate scaling of the normal map. 0 defaults to 1. |
The specular tint override replaces the matching values in the base tag, since you may want different values to compliment the specular colour map.
Field | Type | Usage |
---|---|---|
perpendicular brightness | real fraction | The brightness of the perpendicular specular reflection. |
perpendicular tint color | real argb colour | The tint colour of the perpendicular specular reflection. |
parallel brightness | real fraction | The brightness of the parallel specular reflection. |
parallel tint color | real argb colour | The tint colour of the parallel specular reflection. |
This section only applies when using the shader on BSP.
Field | Type | Usage |
---|---|---|
flags | word flags | Controls whether directional lightmaps should be used with this shader. |
The OS shader model shaders allow you to have specular reflections on your models.
Field | Type | Usage |
---|---|---|
specular lighting exponent | real | The specular reflection is raise to this power, which controls the size of the highlight. |
specular lighting coefficient | real | The specular reflection is multiplied by this coefficient, which controls the brightness of the highlight. |
OpenSauce adds directional lightmaps to the engine (As used in Valve's source engine) which allows you to have normal mapped static lighting on BSP. The shader uses the shader environments normal map.
Directional lightmaps are created in 3DS Max using the provided lightmap rendering script, or in Maya using it's built in DLM renderer (used to be called Turtle). The rendered lightmaps are added to the scenario tag as part of the BSP modifier system.
Field | Type | Usage |
---|---|---|
flags | word flags | Controls whether directional lightmaps should be used with this shader. |
bump amount | real | Controls the strength of the shader's normal map. |
With access to directional lightmap data it has been possible to add a type of static specular lightmapping to the engine. The shader uses a reflected eye vector to sample the diffuse lightmap to get the light accumulated from the specular direction. Specular DLM's are reliant on diffuse DLM's, so they will also be disabled if diffuse DLM's are disabled.
The specular map allows you to change the colour of the specular reflection at the pixel level.
Field | Type | Usage |
---|---|---|
specular color map | tag reference | The specular colour map. |
specular color coefficient | real | The specular map colour is multiplied by this value. 0 defaults to 1. |
specular color exponent | real | The specular map colour is raise to this power. 0 defaults to 1. |
flags | word flags | Sets whether to use the alpha channel as an exponent mask. |
The specular tint and brightness values control the colour of the specular reflection at direct and glancing angles.
Field | Type | Usage |
---|---|---|
perpendicular brightness | real fraction | The brightness of the perpendicular specular reflection. |
perpendicular tint color | real argb colour | The tint colour of the perpendicular specular reflection. |
parallel brightness | real fraction | The brightness of the parallel specular reflection. |
parallel tint color | real argb colour | The tint colour of the parallel specular reflection. |
These values are not the same as those in the shader model tag. Lightmaps are pre-calculated colours values baked into a bitmap, and as such the data required to calculate the specular attenuation correctly is not available. So to get the specular attenuation, the shader uses the luminosity of the diffuse lightmap to which the following values are then applied. You will need to try it out and choose values that are best for you. This isn't a realistic lighting algorithm by any means but it can produces reasonable results.
Field | Type | Usage |
---|---|---|
specular lighting exponent | real | The specular reflection is raise to this power, which controls the size of the highlight. |
specular lighting coefficient | real | The specular reflection is multiplied by this coefficient, which controls the brightness of the highlight. |
The effect shader is a transparent shader used in particle systems. As such, you will find extension values available in the contrail, particle, particle_system and weather_particle_system tags.
Effect depth fading allows you to soften the edges of your effects when close to opaque meshes, and when close to the camera. Depth fading relies upon the depth buffer in the GBuffer. If the GBuffer is disabled or unavailable, depth fading will not be used.
Field | Type | Usage |
---|---|---|
depth fade distance | real | The fade out start distance when close to an opaque surface. |
camera fade distance | real | The fade out start distance when close to the camera. |
-
Wiki Home
- Halo 1
- FAQ
- Getting Started
- Related Forum Threads (Legacy)
- Post-Mortem
- Gamers
- Modders
- Server Hosts
- HTTP Server
- Map Download
- Programmers