Reader small image

You're reading from  Game Development with Blender and Godot

Product typeBook
Published inSep 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781801816021
Edition1st Edition
Right arrow
Author (1)
Kumsal Obuz
Kumsal Obuz
author image
Kumsal Obuz

Kumsal Obuz is a self taught, but veteran web developer with more than 15 years of experience in two different countries, leading teams and projects of various sizes. After several years of preparation and transition, he started his own game studio in August 2020. He launched a small puzzle strategy game at the end of 2020 and is currently working on an ambitious farming simulation game. He also likes to mentor, perhaps due to his genetic background since both of his parents are teachers, and because of his love of Godot, founded and still organizes the Godot Toronto Meetup group.
Read more about Kumsal Obuz

Right arrow

Discovering shaders

Shaders were defined as two things at the beginning of this chapter: a piece of code and a user manual. Have you felt like you’ve been writing code so far? Most likely, no.

Nevertheless, behind that Material user interface, there is a code layer, which is the shader. For example, the default shader you’ve been using so far has hundreds of lines of code. The following is only a portion of the code that makes that shader:

metallic = saturate(metallic);
transmission = saturate(transmission);
float diffuse_weight = (1.0 - transmission) * (1.0 - 
  metallic);
transmission *= (1.0 - metallic);
float specular_weight = (1.0 - transmission);
clearcoat = max(clearcoat, 0.0);
transmission_roughness = 1.0 - (1.0 - roughness) * (1.0 -
  transmission_roughness);
specular = max(0.0, specular);

Luckily for you, you don’t have to write a single line of code. More importantly, Blender interprets the shader code so that it can offer...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Game Development with Blender and Godot
Published in: Sep 2022Publisher: PacktISBN-13: 9781801816021

Author (1)

author image
Kumsal Obuz

Kumsal Obuz is a self taught, but veteran web developer with more than 15 years of experience in two different countries, leading teams and projects of various sizes. After several years of preparation and transition, he started his own game studio in August 2020. He launched a small puzzle strategy game at the end of 2020 and is currently working on an ambitious farming simulation game. He also likes to mentor, perhaps due to his genetic background since both of his parents are teachers, and because of his love of Godot, founded and still organizes the Godot Toronto Meetup group.
Read more about Kumsal Obuz