You can supply multiple textures to a shader to draw with. You can use this to create a masking effect by using the color of one texture with the alpha of another, or you can use the extra textures to affect the final rendering in other ways!
I'll be making videos on materials and other effects you can do with this in the coming months. This is how texture maps for 3D materials are supplied to the shader, and it's also an important part of the toon shader effect.
Here's the code:
https://github.com/DragoniteSpam-Game...
Texture pages:
• Texture Groups and Texture Management - Ga...
Notes about HLSL vs GLSL ES:
GLSL ES is the general shader language that works for any target platform on GameMaker (or can be automatically translated into something else), while HLSL is specific to Windows and the DirectX graphics API. They serve the same purpose, but there are syntactical differences between them and some functions and keywords have difference names: a "vec4" in GLSL ES is referred to as a "float4" in HLSL, and the equivalent to the "sampler2D" function is "Texture2D."
Although for what it's worth, if you're already writing shaders in HLSL, you probably already know all of this. ¯\_(ツ)_/¯
You can see a longer list of differences on Microsoft's developer notes page:
https://docs.microsoft.com/en-us/wind...
Textures by Nico Tzogalis from the Noun Project
GameMaker 3D playlist:
• 3D in Game Maker Studio 2
Shader playlist:
• Shader Stuff - GameMaker Studio 2
GameMaker Studio 2 playlist:
• Game Maker Studio 2 - General Tutorials
#GameMaker3D
#GameMaker3DShaders
#GameMaker3DTextureSamplers
- - - -
I've now made that Patreon:
/ wizardragon
That promised social media link spam.
/ dragonitespam
Transition / idle music is by my old friend Kamex:
/ greatgabite
Rate, comment, subscribe, watch more, enjoy!