HLSL Shader Bump + Specular + per pixel lighting ..
Posted: 27 Jun 2013, 10:37
Hello,
this work is based on the example Dierk Ohlerich has posted (New HLSL Shader Semantics in Ventuz 3.07.01) last year.
We have extended it with Bump + Specular Texture support. But we also had to limit it a bit and did some usage modification.
The bump formula is exactly the same as been used in Ventuz-Bump-Node (thanks to Karol).
Features:
- Per Pixel Lighting up to 4 lights
- Bump calc. up to 4 lights (normal texture must be located in Stage 3)
- Specular texture (specular texture will be multiplied with specular color coming from the lights)
- Stage 1 / 2 diffuse Textures can be combined in different ways
Please take the shader as it is, but do not blame us when something is not working as expected.
The HLSL code is quite self explanatory and could be a good start to get into shader programming.
includes a small silly example of how to use.
Enjoy,
Glare-Technologies
this work is based on the example Dierk Ohlerich has posted (New HLSL Shader Semantics in Ventuz 3.07.01) last year.
We have extended it with Bump + Specular Texture support. But we also had to limit it a bit and did some usage modification.
The bump formula is exactly the same as been used in Ventuz-Bump-Node (thanks to Karol).
Features:
- Per Pixel Lighting up to 4 lights
- Bump calc. up to 4 lights (normal texture must be located in Stage 3)
- Specular texture (specular texture will be multiplied with specular color coming from the lights)
- Stage 1 / 2 diffuse Textures can be combined in different ways
Please take the shader as it is, but do not blame us when something is not working as expected.
The HLSL code is quite self explanatory and could be a good start to get into shader programming.
includes a small silly example of how to use.
Enjoy,
Glare-Technologies