Instant racing fun in the vein of arcade classics with modernized mechanics and special skills to use intelligently. No random power-ups mess.

Post news Report RSS Shaders and materials

Hello everybody! Today we have a small technical post for you. If you haven't read the title yet, we are going to talk about shaders and materials. What is a shader? It's a piece of code which comunicates with the GPU and defines what kind of properties and assets will be used and how, in order to render a surface in a certain way.

Posted by on

Hello everybody!

Today we have a small technical post for you. If you haven't read the title yet, we are going to talk about shaders and materials.

What is a shader? It's a piece of code which comunicates with the GPU and defines what kind of properties and assets will be used and how, in order to render a surface in a certain way.

Some shader examples:



And, what is a material? A material is like a container, where you can adjust parameters and assign assets to a shader. Then you can use the material on a mesh and it will be performed in the surface.


Some of the parameters that you can handle in materials are the shiness, a main color that overlays the material, the tiling (texture repetition) and the texture offset.

The assets that you can assign to a material could be textures, cubemaps and cameras for realtime reflections.


Going deeper, we will show you some examples of the different textures we usually use.

  • Diffuse map: It's the basic "picture" of a surface.
  • Specular/Gloss map: Defines the shiny or glossy areas. It's dependent on surface angle, light angle and viewing angle.
  • Specular color map: It works like the specular map but defining colors.
  • Normal map: Maybe you have seen them already, they are purple textures. They are used for simulating small surface bumps. In the normal maps, each channel (RGB) is used to define the angle of a coordinate (XYZ). Then, in the texture, each pixel's color represents an angle, used for the shader with the lighning for computing a simulated relief surface.

  • Normal map: Maybe you have seen them already, they are purple textures. They are used for simulating small surface bumps. In the normal maps, each channel (RGB) is used to define the angle of a coordinate (XYZ). Then, in the texture, each pixel's color represents an angle, used for the shader with the lighning for computing a simulated relief surface.

Ok, that's all for today. Too much information but we hope you understood it. In the future we will discuss more about graphics.

See you!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: