Browse Source

Clarifying hint_albedo converts color space (#2925)

rainlizard 5 years ago
parent
commit
ed906f81b0
1 changed files with 2 additions and 4 deletions
  1. 2 4
      tutorials/shading/shading_reference/shading_language.rst

+ 2 - 4
tutorials/shading/shading_reference/shading_language.rst

@@ -487,6 +487,8 @@ to make the compiler understand for what the uniform is used.
     uniform float amount : hint_range(0, 1);
     uniform float amount : hint_range(0, 1);
     uniform vec4 other_color : hint_color = vec4(1.0);
     uniform vec4 other_color : hint_color = vec4(1.0);
 
 
+It's important to understand that textures that are supplied as color require hints for proper sRGB->linear conversion (i.e. ``hint_albedo``), as Godot’s 3D engine renders in linear color space.
+
 Full list of hints below:
 Full list of hints below:
 
 
 +----------------+-------------------------------+-------------------------------------+
 +----------------+-------------------------------+-------------------------------------+
@@ -535,10 +537,6 @@ to shaders, Godot converts the type automatically. Below is a table of the corre
 .. note:: Be careful when setting shader uniforms from GDScript, no error will be thrown if the
 .. note:: Be careful when setting shader uniforms from GDScript, no error will be thrown if the
           type does not match. Your shader will just exhibit undefined behaviour.
           type does not match. Your shader will just exhibit undefined behaviour.
 
 
-As Godot's 3D engine renders in linear color space, it's important to understand that textures
-that are supplied as color (i.e. albedo) need to be specified as such for proper sRGB->linear
-conversion.
-
 Uniforms can also be assigned default values:
 Uniforms can also be assigned default values:
 
 
 .. code-block:: glsl
 .. code-block:: glsl