Bladeren bron

Added note on custom shader constants and go.get

Fixes #302
Björn Ritzl 2 jaren geleden
bovenliggende
commit
aa96d5ace8
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 4 0
      docs/en/manuals/material.md

+ 4 - 0
docs/en/manuals/material.md

@@ -78,6 +78,10 @@ go.set("#sprite", "tint", vmath.vector4(1,0,0,1))
 go.animate("#sprite", "tint", go.PLAYBACK_LOOP_PINGPONG, vmath.vector4(1,0,0,1), go.EASING_LINEAR, 2)
 ```
 
+::: sidenote
+In order for a material constant of type `CONSTANT_TYPE_USER` to be available using `go.get()` and `go.set()` it has to be used in the shader program. If the constant is defined in the material but not used in the program it will be removed from the material and it will not be available at run-time.
+:::
+
 ## Samplers
 
 Samplers are used to sample the color information from a texture (a tile source or atlas). The color information can then be used for calculations in the shader program.