Team Fortress 2 GLSL shader

Hello BGEheads :smiley:

Team Fortress 2 had reputation for using stylistic character render. I tried to recreate the shader. Here’s the result.

For see it in action here’s the video.

Well, actually this is modified version of Team Fortress 2 shader. I’m using just diffuse wrap shader from this valve paper. For ambient, it’s using static ambient ramp texture rather than cubemap. For rim and specular, its using rim mask inspired by Star Wars The Old Republic shader, color of rim (ambient) multiplied by rim mask/fresnel. Here’s the breakdown.

If you want know the code, here’s the blend file. Because the model is copyrighted, I’m using Suzanne for the file.

Limitation:

  • Only works with one light with sun type.
  • Must use 4 textures (diffuse, normal, ramp, and ambient ramp, create fake texture if necessary)
1 Like

Or you can simply do it with diffuse ramp.

@JohnnyBlack, but how you create rim shader using diffuse ramp?
I haven’t really explore Blender internal shader yet.

Very interesting. Any way I can get this working in the current version of blender in the standalone player with the blender game engine?

Nice work !!